generate_symlinks.sh 462 B

1234567891011121314151617181920212223
  1. #! /bin/bash
  2. if [ -z "$1" ]
  3. then
  4. echo "No argument supplied"
  5. echo "Need to specify where you want to store data"
  6. exit 1
  7. fi
  8. path=$1
  9. for link in {"data","results","saved_models","models_infos","models_backup","threshold_map","learned_zones","custom_norm"}; do
  10. if [ -L ${link} ]; then
  11. rm ${link}
  12. fi
  13. if [ ! -d "${path}/${link}" ]; then
  14. mkdir -p ${path}/${link}
  15. fi
  16. ln -s ${path}/${link} ${link}
  17. done