changed install script
This commit is contained in:
18
install.sh
18
install.sh
@@ -55,6 +55,15 @@ check_oh-my-zsh () {
|
|||||||
# Check whether linux or macos is used
|
# Check whether linux or macos is used
|
||||||
check_os
|
check_os
|
||||||
|
|
||||||
|
# check if .oh-my-zsh is installed - install if not, update if it is installed.
|
||||||
|
check_oh-my-zsh
|
||||||
|
inst=$?
|
||||||
|
if [ $inst == 3 ]; then
|
||||||
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||||
|
else
|
||||||
|
git -C ~/.oh-my-zsh/ pull
|
||||||
|
fi
|
||||||
|
|
||||||
# Backup dotfiles and link to local versions
|
# Backup dotfiles and link to local versions
|
||||||
for file in $(find ~/dotfiles -maxdepth 1 -name ".*" ! -name ".aliases*" ! -name ".zshrc*" ! -name ".zcompdum*" ! -name ".*history*" -type f -printf "%f\n" ); do
|
for file in $(find ~/dotfiles -maxdepth 1 -name ".*" ! -name ".aliases*" ! -name ".zshrc*" ! -name ".zcompdum*" ! -name ".*history*" -type f -printf "%f\n" ); do
|
||||||
check_exist $file
|
check_exist $file
|
||||||
@@ -76,15 +85,6 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# check if .oh-my-zsh is installed - install if not, update if it is installed.
|
|
||||||
check_oh-my-zsh
|
|
||||||
inst=$?
|
|
||||||
if [ $inst == 3 ]; then
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
|
||||||
else
|
|
||||||
git -C ~/.oh-my-zsh/ pull
|
|
||||||
fi
|
|
||||||
|
|
||||||
# link the .zshrc-file in home-directory depending on the underlying os
|
# link the .zshrc-file in home-directory depending on the underlying os
|
||||||
if [ $os == linux ];then
|
if [ $os == linux ];then
|
||||||
ln -s ~/dotfiles/.zshrc-linux ~/.zshrc
|
ln -s ~/dotfiles/.zshrc-linux ~/.zshrc
|
||||||
|
|||||||
Reference in New Issue
Block a user