Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add date to create-links backup file name

  • Loading branch information...
commit 17fa48293ade59f4df2e7d2beced7d11c015b44d 1 parent 60b7a4c
@StephenBrown2 authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 create-links
View
5 create-links
@@ -12,8 +12,9 @@ for file in [a-zA-Z]* ; do
echo " Removing symbolic link ~/.$file"
rm ~/."$file"
elif [[ -a ~/."$file" ]] ; then
- echo " ~/.$file exists. Moving it to ~/.$file.back"
- mv ~/."$file" ~/."$file".back || echo "Couldn't move ~/.$file to ~/.$file.back!"
+ date=$(date '+%FT%T');
+ echo " ~/.$file exists. Moving it to ~/.$file.back.$date"
+ mv ~/."$file" ~/."$file".back.$date || echo "Couldn't move ~/.$file to ~/.$file.back.$date!"
fi
ln -s `pwd`/"$file" ~/."$file" && echo "Linked ~/.$file to `pwd`/$file" || echo "Couldn't link ~/.$file to `pwd`/$file!"
Please sign in to comment.
Something went wrong with that request. Please try again.