Add 'mkdir', and 'install' scripts
This commit is contained in:
parent
cd788b4afb
commit
71d41947cc
3 changed files with 34 additions and 11 deletions
|
@ -28,17 +28,8 @@ fi
|
||||||
if [ -e "${sharebase}"/"${skel}".skeleton ]; then
|
if [ -e "${sharebase}"/"${skel}".skeleton ]; then
|
||||||
target="${sharebase}"/"${skel}".skeleton
|
target="${sharebase}"/"${skel}".skeleton
|
||||||
destdir="$(pwd)"/"${appname}"
|
destdir="$(pwd)"/"${appname}"
|
||||||
cd "${target}"
|
"${libexec}"/scripts/mkdir "${target}" "${destdir}"
|
||||||
find . \
|
"${libexec}"/scripts/install "${target}" "${destdir}"
|
||||||
-type d \
|
|
||||||
-exec install -d -m u=rwx,g=rx,o= "${destdir}"/"{}" \; \
|
|
||||||
-exec echo -n . \;
|
|
||||||
echo
|
|
||||||
find . \
|
|
||||||
-type f \
|
|
||||||
-exec install -m u=rwx,g=rx,o= {} "${destdir}"/"{}" \; \
|
|
||||||
-exec echo -n . \;
|
|
||||||
echo
|
|
||||||
printok "initialized ${appname}"
|
printok "initialized ${appname}"
|
||||||
else
|
else
|
||||||
printerr "skeleton ${skel} was not found"
|
printerr "skeleton ${skel} was not found"
|
||||||
|
|
16
libexec/webskel/scripts/install
Executable file
16
libexec/webskel/scripts/install
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
##
|
||||||
|
# variables
|
||||||
|
target="${1}"
|
||||||
|
destdir="${2}"
|
||||||
|
|
||||||
|
##
|
||||||
|
# main
|
||||||
|
cd "${target}"
|
||||||
|
find . \
|
||||||
|
-type f \
|
||||||
|
-exec install -m u=rwx,g=rx,o= {} "${destdir}"/"{}" \; \
|
||||||
|
-exec echo -n . \;
|
||||||
|
echo
|
16
libexec/webskel/scripts/mkdir
Executable file
16
libexec/webskel/scripts/mkdir
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
##
|
||||||
|
# variables
|
||||||
|
target="${1}"
|
||||||
|
destdir="${2}"
|
||||||
|
|
||||||
|
##
|
||||||
|
# main
|
||||||
|
cd "${target}"
|
||||||
|
find . \
|
||||||
|
-type d \
|
||||||
|
-exec install -d -m u=rwx,g=rx,o= "${destdir}"/"{}" \; \
|
||||||
|
-exec echo -n . \;
|
||||||
|
echo
|
Loading…
Reference in a new issue