This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

check whether file/directory exists

  • Loading branch information...
mengxr committed Aug 14, 2014
1 parent cb229f9 commit 7b781edf3ad34575247bbe54ddcb33f08badec04
Showing with 5 additions and 0 deletions.
  1. +5 −0 copy-dir.sh
View
@@ -28,6 +28,11 @@ if [[ "$#" != "1" ]] ; then
usage
fi
if [[ ! -e "$1" ]] ; then
echo "File or directory $1 doesn't exist!"
exit 1
fi
DIR=`readlink -f "$1"`
DIR=`echo "$DIR"|sed 's@/$@@'`
DEST=`dirname "$DIR"`

0 comments on commit 7b781ed

Please sign in to comment.