diff --git a/dots/bin/syncDirSetup.sh b/dots/bin/syncDirSetup.sh index 2a4d8d7..77fcb33 100755 --- a/dots/bin/syncDirSetup.sh +++ b/dots/bin/syncDirSetup.sh @@ -57,4 +57,16 @@ else du --human-readable --max-depth=1 ${trg_dir} fi -echo +# set up auto mount +the_file=/etc/fstab +if [ -f "${the_file}" ]; then + if ! more ${the_file} | grep 'syncDir' + then + echo "# auto mount syncDir" | sudo tee -a ${the_file} + echo "${src_dir} ${trg_dir} auto defaults,nofail,nobootwait,bind 0 2" | sudo tee -a ${the_file} + + echo "auto mount added to '${the_file}'" + fi +fi + +echo ""