Created
August 20, 2018 21:04
-
-
Save Y-Less/ee0a890626191e463f214d27f8ee6561 to your computer and use it in GitHub Desktop.
rm.sh used by all.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #echo 'rm:' | |
| #echo `pwd` | |
| IFS='.' read -ra p <<< "$3" | |
| if [[ "${p[0]}" == "YSI-$1/$2" ]]; | |
| then | |
| # Skip files already in the target correctly. | |
| : | |
| elif [[ "${p[0]}" == "YSI_$1/$2" ]]; | |
| then | |
| IFS='/' read -ra x <<< "$3" | |
| if [[ "${p[1]}" == "md" ]]; | |
| then | |
| mv "$3" "YSI-$1/README.md" | |
| else | |
| mv "$3" "YSI-$1/" | |
| fi | |
| else | |
| rm -r "$3" | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment