- # Fix tmux resurrect files, but only if resurrect files have already been restored!
- shopt -s nullglob dotglob
- files=(~/.tmux/resurrect/*)
- if (( ${#files[*]} )) ## First check whether directory is empty, and if it is not, then abort.
- then
- if
- f() { local F; for F; do [[ -L $F ]] || return 1; done; return 0; }; f ~/.tmux/resurrect/* ## If it's not empty, check whether it contains only symlinks.
- then bash ~/env_deploy/tmux_fix.sh ## If it contains only symlinks, run that script.
- else echo "Don't forget to restore tmux-resurrect files!"
- fi
- else echo "Directory not empty, aborting..." && exit 1
- fi
- shopt -u nullglob dotglob
tmux_tst
Posted by Anonymous on Mon 8th Feb 2016 16:20
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.