|
|
@ -1,6 +1,7 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
BASEDIR=$PWD |
|
|
|
CURDIR=$PWD |
|
|
|
# shellcheck disable=SC1091 |
|
|
|
REQUIRED_PKGS=(jq rsync file git) |
|
|
|
|
|
|
|
function usage() { |
|
|
@ -15,10 +16,10 @@ function install_host() { |
|
|
|
[ $(id -u) -ne 0 ] && echo 'root privilege required' && exit 1 |
|
|
|
|
|
|
|
# shellcheck disable=SC1091 |
|
|
|
source "$BASEDIR/lib/functions.sh" |
|
|
|
source "$CURDIR/lib/functions.sh" |
|
|
|
idem_apt_install "${REQUIRED_PKGS[@]}" |
|
|
|
|
|
|
|
if [[ ! $BASEDIR == '/opt/debian-bash' ]]; then |
|
|
|
if [[ ! $CURDIR == '/opt/debian-bash' ]]; then |
|
|
|
# download and filfull /opt/debian-bash, then run it from folder |
|
|
|
|
|
|
|
if [[ -L /opt/debian-bash ]]; then |
|
|
@ -54,7 +55,7 @@ function install_host() { |
|
|
|
|
|
|
|
echo "$i needs installation $(basename $i)" |
|
|
|
mv "$i" "$i.$ORIGINAL" |
|
|
|
ln -s "$BASEDIR/$(basename $i)" "$i" |
|
|
|
ln -s "$CURDIR/$(basename $i)" "$i" |
|
|
|
else |
|
|
|
echo "$i" already overriden |
|
|
|
fi |
|
|
|