zshify 12.2.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/script.zsh +15 -23
- package/package.json +1 -1
package/bin/script.zsh
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
#!/bin/zsh
|
|
2
2
|
mkdir -p ~/.zshify
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/profile.zsh | cat >~/.zshify/config/profile.zsh
|
|
8
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/background.zsh | cat >~/.zshify/config/background.zsh
|
|
9
|
-
grep "source ~/.zshify/config/background.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/background.zsh" >>~/.zshrc
|
|
10
|
-
|
|
11
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/fx.zsh | cat >~/.zshify/config/fx.zsh
|
|
12
|
-
grep "source ~/.zshify/config/fx.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/fx.zsh" >>~/.zshrc
|
|
13
|
-
|
|
14
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/alias.zsh | cat >~/.zshify/config/alias.zsh
|
|
15
|
-
grep "source ~/.zshify/config/alias.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/alias.zsh" >>~/.zshrc
|
|
16
|
-
|
|
17
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/plugins.zsh | cat >~/.zshify/config/plugins.zsh
|
|
18
|
-
grep "source ~/.zshify/config/plugins.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/plugins.zsh" >>~/.zshrc
|
|
19
|
-
|
|
20
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/user.zsh | cat >~/.zshify/config/user.zsh
|
|
21
|
-
grep "source ~/.zshify/config/user.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/user.zsh" >>~/.zshrc
|
|
22
|
-
|
|
4
|
+
# Clone the repository
|
|
5
|
+
git clone https://github.com/nrjdalal/zshify.git ~/.zshify
|
|
23
6
|
curl -s https://raw.githubusercontent.com/nrjdalal/pglaunch/main/bin/fx.sh | cat >~/.zshify/config/postgres.zsh
|
|
24
|
-
grep "source ~/.zshify/config/postgres.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/postgres.zsh" >>~/.zshrc
|
|
25
7
|
|
|
26
|
-
|
|
8
|
+
# Source the files
|
|
9
|
+
for config in prompt background fx alias plugins user postgres; do
|
|
10
|
+
grep "source ~/.zshify/config/${config}.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/${config}.zsh" >>~/.zshrc
|
|
11
|
+
done
|
|
27
12
|
|
|
28
|
-
|
|
13
|
+
# Check if Homebrew is installed
|
|
14
|
+
if command -v brew &>/dev/null; then
|
|
15
|
+
echo "\n$(tput setaf 2)brew is already installed!$(tput sgr0)"
|
|
16
|
+
else
|
|
17
|
+
echo "\n$(tput setaf 1)brew not installed!$(tput sgr0) Install via:"
|
|
18
|
+
echo "/bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
|
|
19
|
+
fi
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
echo "\n$(tput setaf 2)zshify enabled! to reload, run -$(tput sgr0) exec zsh"
|
|
31
22
|
|
|
23
|
+
# Cleanup
|
|
32
24
|
[ -f ~/.zshrc ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zshrc >~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
|
|
33
25
|
[ -f ~/.zprofile ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zprofile >~/.zprofile.tmp && mv ~/.zprofile.tmp ~/.zprofile
|