-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (26 loc) · 969 Bytes
/
Copy pathinstall.sh
File metadata and controls
30 lines (26 loc) · 969 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
#!/bin/bash
# Install the filestructure script
cp filestructure /usr/local/bin/filestructure
chmod +x /usr/local/bin/filestructure
# Start installation progress bar
spinner="/-\|"
i=0
while true; do
i=$(( (i+1) %4 ))
printf "\rInstalling File Structure Generator... ${spinner:$i:1}"
sleep 0.1
# Replace 'break' with actual installation steps
# For demonstration, let's run for a few seconds
if [ $SECONDS -ge 5 ]; then # Run for 5 seconds
break
fi
done
printf "\rInstalling File Structure Generator... Done\n" # Final state
echo -ne "\nInstallation complete! \n"
# Make sure the script is available in the PATH environment variable
echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc
source ~/.bashrc
# Print a success message and provide instructions on how to use the script
echo "File Structure Script installed successfully!"
echo "To learn about usage, run 'filestructure'."
# Provide some examples of how to use the script