Tento commit je obsažen v:
2021-10-21 11:07:24 -04:00
rodič afd9bbdad5
revize d48e7f3f33
2 změnil soubory, kde provedl 8 přidání a 1 odebrání

Zobrazit soubor

@@ -2,6 +2,10 @@
# Common functions for the lab scripts
# Copyright 2021 Bryan C. Roessler
# Don't run this script directly
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 0
ask_ok() {
read -r -p "$* [y/N]" response
response=${response,,}
@@ -15,6 +19,7 @@ is_root() {
[[ $user != "root" ]] && echo "Script must be run with sudo rights!" && exit 1
}
if ! type -t readarray >/dev/null; then
readarray() {
local cmd opt t v=MAPFILE
@@ -48,4 +53,4 @@ if ! type -t readarray >/dev/null; then
eval "${v}+=(\"$line\")"
done
}
fi
fi

Zobrazit soubor

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Install motd scripts
# shellcheck source=./functions
[[ -f functions ]] && . functions || exit 1
is_root
@@ -15,6 +16,7 @@ if [[ -v DEBUG ]]; then
banner="banner.sh"
else
banner="$profiledir/banner.sh"
[[ -f ./functions ]] && cp functions "$profiledir"
fi
cat <<- 'EOF' > "$banner"