Add "destdir"
This commit is contained in:
parent
29ebc7bd0a
commit
1c80d1397b
1 changed files with 6 additions and 4 deletions
|
@ -8,6 +8,8 @@ sharebase="${localbase}"/share/webskel
|
||||||
libexec="${localbase}"/libexec/webskel
|
libexec="${localbase}"/libexec/webskel
|
||||||
appname="${1}"
|
appname="${1}"
|
||||||
skel="${2}"
|
skel="${2}"
|
||||||
|
target=
|
||||||
|
destdir=
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
@ -25,16 +27,16 @@ if [ -z "${skel}" ]; then
|
||||||
fi
|
fi
|
||||||
if [ -e "${sharebase}"/"${skel}".skeleton ]; then
|
if [ -e "${sharebase}"/"${skel}".skeleton ]; then
|
||||||
target="${sharebase}"/"${skel}".skeleton
|
target="${sharebase}"/"${skel}".skeleton
|
||||||
cwd=$(pwd)
|
destdir="$(pwd)"/"${appname}"
|
||||||
cd ${target}
|
cd "${target}"
|
||||||
find . \
|
find . \
|
||||||
-type d \
|
-type d \
|
||||||
-exec install -d -m u=rwx,g=rx,o= "${cwd}"/"${appname}"/"{}" \; \
|
-exec install -d -m u=rwx,g=rx,o= "${destdir}"/"{}" \; \
|
||||||
-exec echo -n . \;
|
-exec echo -n . \;
|
||||||
echo
|
echo
|
||||||
find . \
|
find . \
|
||||||
-type f \
|
-type f \
|
||||||
-exec install -m u=rwx,g=rx,o= {} "${cwd}"/"${appname}"/"{}" \; \
|
-exec install -m u=rwx,g=rx,o= {} "${destdir}"/"{}" \; \
|
||||||
-exec echo -n . \;
|
-exec echo -n . \;
|
||||||
echo
|
echo
|
||||||
printok "initialized ${app}"
|
printok "initialized ${app}"
|
||||||
|
|
Loading…
Reference in a new issue