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