Feat: Passt Default-Config an

This commit is contained in:
2026-05-21 00:13:11 +02:00
parent 23494013c8
commit 70d6d09c65
2 changed files with 26 additions and 24 deletions
+7 -3
View File
@@ -1,5 +1,7 @@
#!/bin/bash
DEFAULT_USR_FOLDER="/usr/share/debian-gaming/home"
if [ "$(id -u)" -ne 0 ]; then
echo "❌ The Skript has to be run as root!"
exit 1
@@ -10,13 +12,15 @@ mkdir -p /etc/profile.d
cp ./data/etc/profile.d/* /etc/profile.d/
# Copy Zsh-Files
mkdir -p $HOME/oh-my-zsh/themes
cp ./data/home/zshrc $HOME/zshrc
cp ./data/home/zshrc $DEFAULT_USR_FOLDER/zshrc
grep -q '^source /etc/profile' /etc/zsh/zprofile || echo 'source /etc/profile' >> /etc/zsh/zprofile
# copy config folder
cp -r $HOME/.config $DEFAULT_USR_FOLDER/config
# copy templates
cp -r ./data/home/templates $HOME/templates
cp -r ./data/home/templates $DEFAULT_USR_FOLDER/templates
# set zsh as default shell
USER_ENTRY=$(getent passwd "$USER")
+19 -21
View File
@@ -9,27 +9,25 @@ CHECK_FILE="$HOME/.config/.debian_gaming_configs_copied"
TEMPLATES_DIR=$(xdg-user-dir TEMPLATES 2>/dev/null || echo "$HOME/Templates")
if [ ! -e "$CHECK_FILE" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
if [ -d "$DEFAULT_USR_FOLDER" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
if [ -e "$HOME/.config" ]; then
mv $HOME/.config $HOME/.config.bak
fi
if [ -e "$HOME/.zshrc" ]; then
mv $HOME/.zshrc $HOME/.zshrc.bak
fi
mkdir -p $HOME/.config
cp -r $DEFAULT_USR_FOLDER/config/* $HOME/.config
cp -r $DEFAULT_USR_FOLDER/templates/* $TEMPLATES_DIR
cp $DEFAULT_USR_FOLDER/zshrc $HOME/.zshrc
touch $CHECK_FILE
if [ -e "$HOME/.oh-my-zsh/themes" ]; then
mv $HOME/.oh-my-zsh/themes $HOME/.oh-my-zsh/.themes.bak
fi
if [ -e "$HOME/.config" ]; then
mv $HOME/.config $HOME/.config.bak
fi
if [ -e "$HOME/.zshrc" ]; then
mv $HOME/.zshrc $HOME/.zshrc.bak
fi
mkdir -p $HOME/.oh-my-zsh/themes
mkdir -p $HOME/.config
cp -r $DEFAULT_USR_FOLDER/config/* $HOME/.config
cp -r $DEFAULT_USR_FOLDER/oh-my-zsh/themes/* $HOME/.oh-my-zsh/themes
cp -r $DEFAULT_USR_FOLDER/templates/* $TEMPLATES_DIR
cp $DEFAULT_USR_FOLDER/zshrc $HOME/.zshrc
touch $CHECK_FILE
fi