Handle the paths in a way theat the resulting directory is relative to the last directory in the path instead of using the full path.

This commit is contained in:
Jorge Vásquez Pérez
2018-12-13 10:49:51 -08:00
parent ced0980d23
commit b982736045
+5 -1
View File
@@ -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"/{} \;;