-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScript.sh
More file actions
29 lines (20 loc) · 945 Bytes
/
Script.sh
File metadata and controls
29 lines (20 loc) · 945 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
# Print starting message
echo "I am starting the game now"
mkdir changes
# Check if the directory exists
cd /var/www/html/freshog.cottonseeds.org || { echo "Error: Failed to change directory. Directory does not exist."; exit 1; }
# mkdir passing-working-fine
# Pull latest changes from git repository with sudo permissions
git pull || {
echo "Git pull failed due to ownership issues. Adding the directory to safe directories..."
git config --global --add safe.directory /var/www/html/freshog.cottonseeds.org || { echo "Error: Failed to add directory to safe list."; exit 1; }
echo "Retrying git pull..."
git pull || { echo "Git pull failed again. Please check the repository settings."; exit 1; }
}
# Prompt for paraphrase
echo "Enter a paraphrase for the pull operation:"
read -r paraphrase
# Print the paraphrase to confirm
echo "You entered the paraphrase: $paraphrase"
# Continue with further operations, if any