Update libexec/ scripts
This commit is contained in:
parent
b2a81cd6cf
commit
9d932201d6
5 changed files with 27 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
|||
set -e
|
||||
|
||||
##
|
||||
# Variables
|
||||
# variables
|
||||
rootdir=$(dirname "$0")
|
||||
gitdir="/home/_portzap/ports"
|
||||
giturl="${PORTZAP_GITURL:-https://git.hardenedbsd.org/hardenedbsd/ports.git}"
|
||||
|
@ -11,7 +11,7 @@ revision="${installdir}/.portzap"
|
|||
libexec=$(realpath "${rootdir}/../libexec/portzap")
|
||||
|
||||
##
|
||||
# Functions
|
||||
# functions
|
||||
require_root() {
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This command requires root privileges."
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/sh -e
|
||||
|
||||
##
|
||||
# main
|
||||
pw useradd -n _portzap \
|
||||
-c "portzap user" \
|
||||
-m \
|
||||
-M "u=rwX,g=rwX,o=" \
|
||||
-s /sbin/nologin
|
||||
chmod -R u=rwX,g=rwX,o= /home/_portzap/
|
||||
echo "/home/_portzap/ has been created."
|
||||
echo OK
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
#!/bin/sh -e
|
||||
|
||||
##
|
||||
# variables
|
||||
giturl=$1
|
||||
gitdir=$2
|
||||
|
||||
##
|
||||
# main
|
||||
if [ -e "${gitdir}/.git" ]; then
|
||||
echo "${gitdir} already exists."
|
||||
echo "Try 'portzap pull' instead."
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
#!/bin/sh -e
|
||||
|
||||
##
|
||||
# variables
|
||||
gitdir=$1
|
||||
installdir=$2
|
||||
excludes=".git .gitignore .hooks .arcconfig"
|
||||
|
||||
##
|
||||
# main
|
||||
cd "${gitdir}"
|
||||
find -s . -maxdepth 1 \
|
||||
-exec cp -Rfv {} "${installdir}" \; \
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
#!/bin/sh -e
|
||||
|
||||
##
|
||||
# variables
|
||||
gitdir=$1
|
||||
|
||||
##
|
||||
# main
|
||||
umask u=rwX,g=rwX,o=
|
||||
if [ -e "${gitdir}/.git" ]; then
|
||||
cd "${gitdir}"
|
||||
|
|
Loading…
Reference in a new issue