Feat: Passt Default-Config an
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -9,11 +9,9 @@ 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
|
||||
|
||||
if [ -e "$HOME/.oh-my-zsh/themes" ]; then
|
||||
mv $HOME/.oh-my-zsh/themes $HOME/.oh-my-zsh/.themes.bak
|
||||
fi
|
||||
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
|
||||
@@ -23,13 +21,13 @@ if [ ! -e "$CHECK_FILE" ]; 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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user