diff --git a/bash/ghostmirror.sh b/bash/ghostmirror.sh index ee64c37..e4bfd93 100755 --- a/bash/ghostmirror.sh +++ b/bash/ghostmirror.sh @@ -1 +1,5 @@ -find "$1"/ -type d -exec mkdir -p "$2"/{} \; -o -type f -exec touch "$2"/{} \;; +orig_dir=$(pwd) +path=$(dirname $1) +dirname=$(basename $1) +cd $path; +find "$dirname"/ -type d -exec mkdir -p "$2"/{} \; -o -type f -exec touch "$2"/{} \;;