-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·29 lines (24 loc) · 826 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·29 lines (24 loc) · 826 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
#!/bin/bash
# Check if jq is installed; if not, install it
if ! command -v jq &> /dev/null; then
echo "jq not found, installing..."
sudo apt-get update
sudo apt-get install -y jq
else
echo "jq is already installed."
fi
# Create a directory for shared files
SHARE_DIR="/usr/local/share/git-comsu"
if [ ! -d "$SHARE_DIR" ]; then
echo "Creating directory for shared files at $SHARE_DIR..."
sudo mkdir -p "$SHARE_DIR"
fi
# Copy prompt to the shared directory
echo "Copying prompt file to $SHARE_DIR..."
sudo cp prompt "$SHARE_DIR/"
# Make git-comsu executable and copy it to /usr/local/bin
echo "Installing git-comsu script to /usr/local/bin..."
sudo cp git-comsu /usr/local/bin/git-comsu
sudo chmod +x /usr/local/bin/git-comsu
echo
echo "Installation completed. You can now run 'git comsu' command."