From bfcd7be17f00cadf1fc2dbfa09153d6a764905dd Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 31 Oct 2024 21:58:34 +0100 Subject: [PATCH] Remove necessity of `INSTALLER_SCRIPT` variable --- scripts/Common/OS/install.fish | 5 +++-- scripts/Common/OS/setup.fish | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Common/OS/install.fish b/scripts/Common/OS/install.fish index 431b1718..5a5a816a 100755 --- a/scripts/Common/OS/install.fish +++ b/scripts/Common/OS/install.fish @@ -1,5 +1,6 @@ #!/bin/env fish set -l dir (status dirname) +set -l cmdline (cat /proc/$fish_pid/cmdline | string split0) source "$dir/../Scripts/config.fish" source "$dir/../Scripts/hooks.fish" @@ -9,7 +10,7 @@ if [ (id -u) -eq 0 ] rm ~/.bash_profile if [ -z "$TMUX" ] - tmux new-session (cat /proc/$fish_pid/cmdline | string split0) + tmux new-session $cmdline else begin echo "Creating setup user" @@ -28,7 +29,7 @@ if [ (id -u) -eq 0 ] echo "$name ALL=(ALL:ALL) NOPASSWD: ALL" end >"$sudoConfig" - and sudo --preserve-env --set-home --user "$name" "$INSTALLER_SCRIPT" + and sudo --preserve-env --set-home --user "$name" $cmdline rm "$sudoConfig" userdel -rf "$name" end diff --git a/scripts/Common/OS/setup.fish b/scripts/Common/OS/setup.fish index 9fd88bf6..7aa0532d 100755 --- a/scripts/Common/OS/setup.fish +++ b/scripts/Common/OS/setup.fish @@ -72,7 +72,6 @@ function runSetup wrapScript ( string join " " \ - "INSTALLER_SCRIPT=$(string escape "$script")" \ "CONFIG_NAME=$(string escape "$CONFIG_NAME")" \ (string escape $script))