-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (22 loc) · 925 Bytes
/
install.sh
File metadata and controls
30 lines (22 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
APP_NAME="pse"
SCRIPT_URL="https://raw.githubusercontent.com/hctilg/pse/main/strength.sh"
CPS_URL="https://raw.githubusercontent.com/hctilg/pse/main/common_passwords.txt"
if [[ $(uname -o) == "Android" ]]; then # Termux
INSTALL_PATH="/data/data/com.termux/files/usr/bin/$APP_NAME"
echo -e "\n [#] Installing $APP_NAME..."
curl -s -o "$INSTALL_PATH" "$SCRIPT_URL"
echo -e "\n [#] Set executable permissions..."
chmod +x "$INSTALL_PATH"
else
INSTALL_PATH="/usr/local/bin/$APP_NAME"
echo -e "\n [#] Installing $APP_NAME..."
sudo curl -s -o "$INSTALL_PATH" "$SCRIPT_URL"
echo -e "\n [#] Set executable permissions..."
sudo chmod +x "$INSTALL_PATH"
fi
echo -e "\n [#] Downloading common passwords..."
curl -s -o "$HOME/common_passwords.txt" "$CPS_URL"
echo -e "\n [#] Installation completed !"
echo -e "\n - You can now run the script with the command '$APP_NAME'.\n"