chore(cli): Exposing OR backups systemwide

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2024-05-23 11:09:19 +02:00
parent de9ffeb6a9
commit a9f1743c0b

View file

@ -106,7 +106,6 @@ log info "Using KUBECONFIG $KUBECONFIG"
tmp_dir=$(mktemp -d) tmp_dir=$(mktemp -d)
function install_packages() { function install_packages() {
[[ -e "$OR_DIR/eget" ]] || { [[ -e "$OR_DIR/eget" ]] || {
cd "$tmp_dir" || log err "Not able to cd to tmp dir $tmp_dir" cd "$tmp_dir" || log err "Not able to cd to tmp dir $tmp_dir"
curl --version &>/dev/null || log err "curl not found. Please install" curl --version &>/dev/null || log err "curl not found. Please install"
@ -132,6 +131,10 @@ function install_packages() {
sudo /var/lib/openreplay/eget -q --upgrade-only --to "$OR_DIR" https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox sudo /var/lib/openreplay/eget -q --upgrade-only --to "$OR_DIR" https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox
} }
date | sudo tee $OR_DIR/packages.lock &>/dev/null date | sudo tee $OR_DIR/packages.lock &>/dev/null
# Adding path to global
if ! grep -q "/var/lib/openreplay" /etc/profile; then
echo 'export PATH=/var/lib/openreplay:$PATH' | sudo tee -a /etc/profile
fi
} }
function help() { function help() {