Skip to content

Instantly share code, notes, and snippets.

@Y-Less
Created August 20, 2018 21:04
Show Gist options
  • Select an option

  • Save Y-Less/ee0a890626191e463f214d27f8ee6561 to your computer and use it in GitHub Desktop.

Select an option

Save Y-Less/ee0a890626191e463f214d27f8ee6561 to your computer and use it in GitHub Desktop.
rm.sh used by all.sh
#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