-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·36 lines (27 loc) · 1.03 KB
/
install.sh
File metadata and controls
executable file
·36 lines (27 loc) · 1.03 KB
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
35
36
#!/bin/bash
# =================================
# POMO INSTALLATION SCRIPT
# author: narlock
#
# 1. Installs the contents of the application into $HOME/Documents/narlock/pomo
# 2. Ensures that the main.py file is executable
# 3. Creates a wrapper to ensure that the 'pomo' command runs with python3
# 4. Ensures the wrapper is executable
# =================================
# Define install paths
INSTALL_DIR="$HOME/Documents/narlock/pomo"
SCRIPT_PATH="$INSTALL_DIR/pomo/main.py"
BIN_PATH="/usr/local/bin/pomo"
echo "Installing Pomo..."
# Create the install directory if it doesn't exist
mkdir -p "$INSTALL_DIR"
# Copy all files to the install directory
cp -r . "$INSTALL_DIR"
# Make sure the script is executable
chmod +x "$SCRIPT_PATH"
# Create a wrapper script to ensure 'mark' runs with python3
echo "#!/bin/bash" | sudo tee "$BIN_PATH" > /dev/null
echo "python3 \"$SCRIPT_PATH\" \"\$@\"" | sudo tee -a "$BIN_PATH" > /dev/null
# Make the wrapper script executable
sudo chmod +x "$BIN_PATH"
echo "🚀 Installation complete! Use 'pomo' to begin."