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
|
||||
target="${sharebase}"/"${skel}".skeleton
|
||||
destdir="$(pwd)"/"${appname}"
|
||||
cd "${target}"
|
||||
find . \
|
||||
-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
|
||||
"${libexec}"/scripts/mkdir "${target}" "${destdir}"
|
||||
"${libexec}"/scripts/install "${target}" "${destdir}"
|
||||
printok "initialized ${appname}"
|
||||
else
|
||||
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