zshify 13.1.0 → 13.3.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.
Files changed (2) hide show
  1. package/bin/script.zsh +18 -14
  2. package/package.json +1 -1
package/bin/script.zsh CHANGED
@@ -1,25 +1,29 @@
1
1
  #!/bin/zsh
2
- rm -rf ~/.zshify
3
2
 
4
- # Clone the repository
5
- git clone https://github.com/nrjdalal/zshify.git ~/.zshify
6
- curl -s https://raw.githubusercontent.com/nrjdalal/pglaunch/main/bin/fx.sh | cat >~/.zshify/config/postgres.zsh
3
+ temp_dir=$(mktemp -d)
4
+ git clone https://github.com/nrjdalal/zshify.git "$temp_dir" &>/dev/null
5
+ curl -s https://raw.githubusercontent.com/nrjdalal/pglaunch/main/bin/fx.sh | cat >"$temp_dir/config/postgres.zsh"
6
+ mkdir -p ~/.zshify
7
+ rsync -a --delete "$temp_dir"/ ~/.zshify/
8
+ rm -rf "$temp_dir"
7
9
 
8
- # Source the files
9
10
  for config in prompt background fx alias plugins user postgres; do
10
11
  grep "source ~/.zshify/config/${config}.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/${config}.zsh" >>~/.zshrc
11
12
  done
12
13
 
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)\""
14
+ echo
15
+ echo "-------------- $(tput setaf 2)zshify successfully installed\!$(tput sgr0) --------------"
16
+ if ! command -v brew &>/dev/null; then
17
+ echo
18
+ echo "you can't brew without the brew, right? hightly recommended\!"
19
+ echo
20
+ echo "--- $(tput setaf 6)/bin/bash -c \"\$(curl -fsSL https://rdt.li/homebrew)\"$(tput sgr0) ---"
19
21
  fi
22
+ echo
23
+ echo "it is recommended to reload the shell, run $(tput setaf 3)exec zsh$(tput sgr0) to do so"
24
+ echo
20
25
 
21
- echo "\n$(tput setaf 2)zshify enabled! to reload, run -$(tput sgr0) exec zsh"
22
-
23
- # Cleanup
24
26
  [ -f ~/.zshrc ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zshrc >~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
25
27
  [ -f ~/.zprofile ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zprofile >~/.zprofile.tmp && mv ~/.zprofile.tmp ~/.zprofile
28
+
29
+ exec zsh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zshify",
3
- "version": "13.1.0",
3
+ "version": "13.3.0",
4
4
  "description": "A minimalistic touch to your prompt!",
5
5
  "bin": {
6
6
  "prompt": "bin/script.zsh"