testing so it will be more compatible for countries that block github raw
This commit is contained in:
@@ -4,8 +4,12 @@
|
|||||||
|
|
||||||
zsh_pkg=(
|
zsh_pkg=(
|
||||||
eza
|
eza
|
||||||
|
mercurial
|
||||||
zsh
|
zsh
|
||||||
zsh-completions
|
zsh-completions
|
||||||
|
)
|
||||||
|
|
||||||
|
zsh_pkg2=(
|
||||||
fzf
|
fzf
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -28,23 +32,30 @@ for ZSH in "${zsh_pkg[@]}"; do
|
|||||||
install_package "$ZSH" "$LOG"
|
install_package "$ZSH" "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Check if the zsh-completions directory exists
|
||||||
|
if [ -d "zsh-completions" ]; then
|
||||||
|
rm -rf zsh-completions
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Oh My Zsh, plugins, and set zsh as default shell
|
# Install Oh My Zsh, plugins, and set zsh as default shell
|
||||||
if command -v zsh >/dev/null; then
|
if command -v zsh >/dev/null; then
|
||||||
printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
|
||||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||||
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
sh -c "$(curl -fsSL https://install.ohmyz.sh)" "" --unattended
|
||||||
else
|
else
|
||||||
echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the directories exist before cloning the repositories
|
# Check if the directories exist before cloning the repositories
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
else
|
else
|
||||||
echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
else
|
else
|
||||||
echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
@@ -78,6 +89,12 @@ if command -v zsh >/dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Installing core zsh packages
|
||||||
|
printf "\n%s - Installing ${SKY_BLUE}fzf${RESET} .... \n" "${NOTE}"
|
||||||
|
for ZSH2 in "${zsh_pkg2[@]}"; do
|
||||||
|
install_package "$ZSH2" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
# copy additional oh-my-zsh themes from assets
|
# copy additional oh-my-zsh themes from assets
|
||||||
if [ -d "$HOME/.oh-my-zsh/themes" ]; then
|
if [ -d "$HOME/.oh-my-zsh/themes" ]; then
|
||||||
cp -r assets/add_zsh_theme/* ~/.oh-my-zsh/themes >> "$LOG" 2>&1
|
cp -r assets/add_zsh_theme/* ~/.oh-my-zsh/themes >> "$LOG" 2>&1
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# pokemon-color-scripts#
|
# pokemon-color-scripts#
|
||||||
|
|
||||||
poke=(
|
|
||||||
mercurial
|
|
||||||
)
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
@@ -19,22 +15,25 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log"
|
||||||
|
|
||||||
# for the new oh my zsh theme
|
printf "${NOTE} Removing any traces of ${SKY_BLUE}Pokemon Color Scripts${RESET}\n"
|
||||||
printf "${NOTE} Installing ${SKY_BLUE}additional dependencies for oh my zsh theme${RESET}\n"
|
|
||||||
for pok in "${poke[@]}"; do
|
|
||||||
install_package "$pok" "$LOG"
|
|
||||||
done
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
|
|
||||||
printf "${INFO} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..."
|
# Check if the pokemon directory exists
|
||||||
|
if [ -d "/usr/local/opt/pokemon-colorscripts" ]; then
|
||||||
if [ -d "pokemon-colorscripts" ]; then
|
sudo rm -rf /usr/local/opt/pokemon-colorscripts
|
||||||
cd pokemon-colorscripts && git pull && sudo ./install.sh && cd ..
|
|
||||||
else
|
|
||||||
git clone --depth 1 https://gitlab.com/phoneybadger/pokemon-colorscripts.git &&
|
|
||||||
cd pokemon-colorscripts && sudo ./install.sh && cd ..
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if the pokemon file exists
|
||||||
|
if [ -f "/usr/local/bin/pokemon-colorscripts" ]; then
|
||||||
|
sudo rm -f /usr/local/bin/pokemon-colorscripts
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install Pokemon Color Scripts
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}Pokemon Color Scripts${RESET}\n"
|
||||||
|
for pok in "pokemon-colorscripts-git"; do
|
||||||
|
install_package "$pok" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
# Check if ~/.zshrc exists
|
# Check if ~/.zshrc exists
|
||||||
if [ -f "$HOME/.zshrc" ]; then
|
if [ -f "$HOME/.zshrc" ]; then
|
||||||
sed -i '/#pokemon-colorscripts --no-title -s -r | fastfetch -c $HOME\/.config\/fastfetch\/config-pokemon.jsonc --logo-type file-raw --logo-height 10 --logo-width 5 --logo -/s/^#//' "$HOME/.zshrc" >> "$LOG" 2>&1
|
sed -i '/#pokemon-colorscripts --no-title -s -r | fastfetch -c $HOME\/.config\/fastfetch\/config-pokemon.jsonc --logo-type file-raw --logo-height 10 --logo-width 5 --logo -/s/^#//' "$HOME/.zshrc" >> "$LOG" 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user