-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
34 lines (27 loc) · 922 Bytes
/
install.sh
File metadata and controls
34 lines (27 loc) · 922 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
31
32
33
34
#!/data/data/com.termux/files/usr/bin/env bash
set -e
echo ">>> EraldForge installer for Termux"
echo "Updating packages..."
pkg update -y && pkg upgrade -y
echo "Installing required packages..."
pkg install -y python git wget nano nmap termux-api
# pip packages
pip install --upgrade pip
pip install python-dateutil pyqrcode pillow qrcode
# Prepare install dir
TARGET="$HOME/eraldforge"
if [ -d "$TARGET" ]; then
echo "Found existing $TARGET — backing up"
mv "$TARGET" "${TARGET}_backup_$(date +%s)"
fi
echo "Copying project files to $TARGET"
cp -r . "$TARGET"
chmod +x "$TARGET"/launcher.py
for f in "$TARGET"/tools/*/*.py; do
chmod +x "$f"
done
# Symlink launcher to PATH
PREFIX=${PREFIX:-/data/data/com.termux/files/usr}
ln -sf "$TARGET/launcher.py" "$PREFIX/bin/eraldforge"
echo "Installed. Run 'eraldforge' to start the launcher."
echo "Run 'termux-setup-storage' once if you need access to storage."