From 7c5baec7470d7aa451bc42e30751a3d47793257a Mon Sep 17 00:00:00 2001 From: xyhhx Date: Wed, 11 Sep 2024 21:22:06 -0400 Subject: [PATCH] refactor: remove utils.sh --- common/utils.sh | 11 ----------- fedora-gnome/fedora-gnome.sh | 10 ++++++++-- fedora-minimal/fedora-minimal.sh | 10 ++++++++-- 3 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 common/utils.sh diff --git a/common/utils.sh b/common/utils.sh deleted file mode 100644 index 6d1046e..0000000 --- a/common/utils.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -eu -o pipefail - -unpriv(){ - sudo -u nobody "${@}" -} - -dl() { - unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null -} diff --git a/fedora-gnome/fedora-gnome.sh b/fedora-gnome/fedora-gnome.sh index 104f0f4..7b45387 100644 --- a/fedora-gnome/fedora-gnome.sh +++ b/fedora-gnome/fedora-gnome.sh @@ -14,9 +14,15 @@ # License for the specific language governing permissions and limitations under # the License. -set -eu +set -eu -o pipefail -source '../common/utils.sh' +unpriv(){ + sudo -u nobody "${@}" +} + +dl() { + unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null +} # Compliance sudo systemctl mask debug-shell.service diff --git a/fedora-minimal/fedora-minimal.sh b/fedora-minimal/fedora-minimal.sh index 7b809b2..86e487a 100644 --- a/fedora-minimal/fedora-minimal.sh +++ b/fedora-minimal/fedora-minimal.sh @@ -14,9 +14,15 @@ # License for the specific language governing permissions and limitations under # the License. -set -eu +set -eu -o pipefail -source "../common/utils.sh" +unpriv(){ + sudo -u nobody "${@}" +} + +dl() { + unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null +} # Compliance systemctl mask debug-shell.service