adjusted for loops
This commit is contained in:
parent
ea0071302c
commit
736a4fc29a
@ -16,10 +16,23 @@ sudo apt update
|
|||||||
|
|
||||||
#install fish and copy config file to root and all users under /home/
|
#install fish and copy config file to root and all users under /home/
|
||||||
sudo apt install fish -y
|
sudo apt install fish -y
|
||||||
wget $fishconfig -P "$HOME/.config/fish/config.fish"
|
wget -O "$HOME/.config/fish/config.fish" $fishconfig
|
||||||
for homedir in /home/*; do
|
# Iterate over each user's home directory, including /root
|
||||||
sudo cp -r $HOME/.config/fish/config.fish "$homedir/.config/fish/";
|
for homedir in /home/*; do
|
||||||
sudo chown $homedir:$homedir "$homedir/.config/fish/config.fish";
|
if [ -d "$homedir" ]; then
|
||||||
|
# Ensure .config directory exists
|
||||||
|
mkdir -p "$homedir/.config"
|
||||||
|
mkdir -p "$homedir/.config/fish"
|
||||||
|
|
||||||
|
# Copy starship.toml to the user's .config directory
|
||||||
|
cp "$HOME/.config/fish/config.fish" "$homedir/.config/fish/config.fish"
|
||||||
|
|
||||||
|
# Set ownership to the user of the home directory
|
||||||
|
chown $(basename "$homedir"):"$(id -gn $(basename "$homedir"))" "$homedir/.config/fish/config.fish"
|
||||||
|
|
||||||
|
# Optional: Set permissions to 0644 (readable by owner and group, readable by others)
|
||||||
|
chmod 0644 "$homedir/.config/fish/config.fish"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#install pyenv
|
#install pyenv
|
||||||
@ -27,14 +40,24 @@ curl https://pyenv.run | bash
|
|||||||
|
|
||||||
#Download starship and copy config file to root and all users under /home/
|
#Download starship and copy config file to root and all users under /home/
|
||||||
curl -sS https://starship.rs/install.sh | sh
|
curl -sS https://starship.rs/install.sh | sh
|
||||||
wget $starshipconfig -P "$HOME/.config/starship.toml"
|
wget -O "$HOME/.config/starship.toml" $starshipconfig
|
||||||
for homedir in /home/*; do
|
# Iterate over each user's home directory, including /root
|
||||||
sudo cp -r $HOME/.config/starship.toml "$homedir/.config/";
|
for homedir in /home/*; do
|
||||||
sudo chown $homedir:$homedir "$homedir/.config/starship.toml";
|
if [ -d "$homedir" ]; then
|
||||||
|
# Ensure .config directory exists
|
||||||
|
mkdir -p "$homedir/.config"
|
||||||
|
|
||||||
|
# Copy starship.toml to the user's .config directory
|
||||||
|
cp "$HOME/.config/starship.toml" "$homedir/.config/starship.toml"
|
||||||
|
|
||||||
|
# Set ownership to the user of the home directory
|
||||||
|
chown $(basename "$homedir"):"$(id -gn $(basename "$homedir"))" "$homedir/.config/starship.toml"
|
||||||
|
|
||||||
|
# Optional: Set permissions to 0644 (readable by owner and group, readable by others)
|
||||||
|
chmod 0644 "$homedir/.config/starship.toml"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
#Change default shell to fish
|
#Change default shell to fish
|
||||||
chsh -s /usr/bin/fish
|
chsh -s /usr/bin/fish
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user