Rename environment variables
This commit is contained in:
parent
9e5d8c30b2
commit
cc3f43c0fc
2 changed files with 15 additions and 15 deletions
24
bin/portzap
24
bin/portzap
|
@ -2,28 +2,28 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
base_dir=$(dirname "$0")
|
rootdir=$(dirname "$0")
|
||||||
ports_url="${PORTZAP_PORTS_URL:-https://git.hardenedbsd.org/hardenedbsd/ports.git}"
|
giturl="${PORTZAP_GITURL:-https://git.hardenedbsd.org/hardenedbsd/ports.git}"
|
||||||
ports_dir="${PORTZAP_PORTS_DIR:-/usr/ports/}"
|
gitdir="/home/_portzap/ports"
|
||||||
portzap_file="$ports_dir/.portzap"
|
installdir="${PORTZAP_INSTALLDIR:-/usr/ports/}"
|
||||||
portzap_dir="/home/_portzap/ports"
|
revision="${installdir}/.portzap"
|
||||||
libexec_dir=$(realpath "$base_dir/../libexec/portzap/")
|
libexec=$(realpath "${rootdir}/../libexec/portzap/")
|
||||||
|
|
||||||
# Masks
|
# Masks
|
||||||
clone_mask=007
|
clone_mask=007
|
||||||
pull_mask=007
|
pull_mask=007
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
. "$libexec_dir/functions/portzap-install"
|
. "$libexec/functions/portzap-install"
|
||||||
. "$libexec_dir/functions/portzap-pull"
|
. "$libexec/functions/portzap-pull"
|
||||||
. "$libexec_dir/functions/portzap-clone"
|
. "$libexec/functions/portzap-clone"
|
||||||
. "$libexec_dir/functions/requirements"
|
. "$libexec/functions/requirements"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"clone")
|
"clone")
|
||||||
require_deps git
|
require_deps git
|
||||||
require_group _portzap
|
require_group _portzap
|
||||||
portzap_clone "$portzap_dir" "$ports_url" "$clone_mask"
|
portzap_clone "$portzap_dir" "$giturl" "$clone_mask"
|
||||||
;;
|
;;
|
||||||
"pull")
|
"pull")
|
||||||
require_deps git
|
require_deps git
|
||||||
|
@ -33,7 +33,7 @@ case $1 in
|
||||||
"install")
|
"install")
|
||||||
require_root
|
require_root
|
||||||
require_deps git
|
require_deps git
|
||||||
portzap_install "$ports_dir" "$portzap_dir" "$libexec_dir" "$portzap_file"
|
portzap_install "$installdir" "$portzap_dir" "$libexec" "$portzap_file"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: portzap clone|pull|install"
|
echo "Usage: portzap clone|pull|install"
|
||||||
|
|
|
@ -29,11 +29,11 @@ Pull updates into /home/_portzap/ports/.
|
||||||
Install /home/_portzap/ports/ into /usr/ports/.
|
Install /home/_portzap/ports/ into /usr/ports/.
|
||||||
.Sh ENVIRONMENT VARIABLES
|
.Sh ENVIRONMENT VARIABLES
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width $PORTZAP_PORTS_URL
|
.Bl -tag -width $PORTZAP_GITURL
|
||||||
.It Ev PORTZAP_PORTS_URL
|
.It Ev PORTZAP_GITURL
|
||||||
The URL to a git repository.
|
The URL to a git repository.
|
||||||
Default: https://git.hardenedbsd.org/hardenedbsd/ports.git
|
Default: https://git.hardenedbsd.org/hardenedbsd/ports.git
|
||||||
.It Ev PORTZAP_PORTS_DIR
|
.It Ev PORTZAP_INSTALLDIR
|
||||||
The directory where the ports collection will be installed. Default: /usr/ports/.
|
The directory where the ports collection will be installed. Default: /usr/ports/.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
The
|
The
|
||||||
|
|
Loading…
Reference in a new issue