1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 14:54:23 +00:00

Fix dotfish permissions thingy

This commit is contained in:
Steffo 2024-09-03 01:38:16 +02:00
parent 6c4f17a5a4
commit e9395c3787
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -23,17 +23,17 @@ function dotfish
end end
end end
if test -d "$FISHCONFIG"
log-t "Existing config detected at" "$FISHCONFIG" "pulling from Git..."
command git -C "$FISHCONFIG" pull
else
log-t "No config detected, cloning from Git into" "$FISHCONFIG" "..."
command git clone "https://github.com/Steffo99/.config-fish" "$FISHCONFIG"
end
log-t "Fixing permissions at" "$FISHCONFIG" "..." log-t "Fixing permissions at" "$FISHCONFIG" "..."
command chown -R "$TARGET:" "$FISHCONFIG" command chown -R "$TARGET:" "$FISHCONFIG"
if test -d "$FISHCONFIG"
log-t "Existing config detected at" "$FISHCONFIG" "pulling from Git..."
command sudo -u "$TARGET" -- git -C "$FISHCONFIG" pull
else
log-t "No config detected, cloning from Git into" "$FISHCONFIG" "..."
command sudo -u "$TARGET" -- git clone "https://github.com/Steffo99/.config-fish" "$FISHCONFIG"
end
log-t "Changing login shell to" "/usr/bin/fish" "..." log-t "Changing login shell to" "/usr/bin/fish" "..."
command chsh -s "/usr/bin/fish" "$TARGET" command chsh -s "/usr/bin/fish" "$TARGET"
end end