Remove necessity of INSTALLER_SCRIPT
variable
This commit is contained in:
parent
c364b53d33
commit
bfcd7be17f
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/env fish
|
#!/bin/env fish
|
||||||
set -l dir (status dirname)
|
set -l dir (status dirname)
|
||||||
|
set -l cmdline (cat /proc/$fish_pid/cmdline | string split0)
|
||||||
source "$dir/../Scripts/config.fish"
|
source "$dir/../Scripts/config.fish"
|
||||||
source "$dir/../Scripts/hooks.fish"
|
source "$dir/../Scripts/hooks.fish"
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ if [ (id -u) -eq 0 ]
|
||||||
rm ~/.bash_profile
|
rm ~/.bash_profile
|
||||||
|
|
||||||
if [ -z "$TMUX" ]
|
if [ -z "$TMUX" ]
|
||||||
tmux new-session (cat /proc/$fish_pid/cmdline | string split0)
|
tmux new-session $cmdline
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
echo "Creating setup user"
|
echo "Creating setup user"
|
||||||
|
@ -28,7 +29,7 @@ if [ (id -u) -eq 0 ]
|
||||||
echo "$name ALL=(ALL:ALL) NOPASSWD: ALL"
|
echo "$name ALL=(ALL:ALL) NOPASSWD: ALL"
|
||||||
end >"$sudoConfig"
|
end >"$sudoConfig"
|
||||||
|
|
||||||
and sudo --preserve-env --set-home --user "$name" "$INSTALLER_SCRIPT"
|
and sudo --preserve-env --set-home --user "$name" $cmdline
|
||||||
rm "$sudoConfig"
|
rm "$sudoConfig"
|
||||||
userdel -rf "$name"
|
userdel -rf "$name"
|
||||||
end
|
end
|
||||||
|
|
|
@ -72,7 +72,6 @@ function runSetup
|
||||||
|
|
||||||
wrapScript (
|
wrapScript (
|
||||||
string join " " \
|
string join " " \
|
||||||
"INSTALLER_SCRIPT=$(string escape "$script")" \
|
|
||||||
"CONFIG_NAME=$(string escape "$CONFIG_NAME")" \
|
"CONFIG_NAME=$(string escape "$CONFIG_NAME")" \
|
||||||
(string escape $script))
|
(string escape $script))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue