Skip to content

Commit

Permalink
New color codes
Browse files Browse the repository at this point in the history
  • Loading branch information
exarobibliologist committed Dec 22, 2024
1 parent b5c8fb3 commit 47f2752
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion forcefsck
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function forcefsck()
{
clear
echo -e "${Color009}THIS WILL RESTART YOUR COMPUTER!!${Color_Off}\nPlease save your work and close any open applications.\nAfter the computer restarts, this will run an FSCK to check your drive for errors.\nYou will need to enter your password to confirm this."
echo -e "$(color 9)THIS WILL RESTART YOUR COMPUTER!!$(reset)\nPlease save your work and close any open applications.\nAfter the computer restarts, this will run an FSCK to check your drive for errors.\nYou will need to enter your password to confirm this."
pressanykey
cd
sudo touch /forcefsck
Expand Down
6 changes: 3 additions & 3 deletions installstuff
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ function InstallPackageIfNotExist()

# Check if the package is installed
if ! dpkg -l | awk '{print $2}' | grep -wq "^$package$"; then
echo -e "Working on ${Color196}$package${Color_Off}..."
echo -e "Working on $(color 196)$package$(reset)..."
# Install the package
if [[ "$installer" == "aptitude" ]]; then
sudo aptitude install -Pry "$package" # Use aptitude for forced install
else
sudo apt install "$package" # Use apt as default
fi
else
echo -e "${Color196}$package${Color_Off} is already installed."
echo -e "$(color 196)$package$(reset) is already installed."
fi
}

# Function for menu-driven installation
function installstuff()
{
echo -e "Showing you your sources.list. ${Color196}If anything looks off, abort the script immediately and fix it!${Color_Off}\n"
echo -e "Showing you your sources.list. $(color 196)If anything looks off, abort the script immediately and fix it!$(reset)\n"
grep -e "stable" -e "testing" -e "unstable" -e "experimental" -e "contrib" -e "non-free" /etc/apt/sources.list
pressanykey
KeepInstallingMoreStuff
Expand Down
7 changes: 6 additions & 1 deletion owned
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ if [ -f $1 ]
return
;;
"Change File Access Permissions")
echo -e "-------------------------------------------------------------------------------------------------\n| Owner | Group | Others |\n|(R)ead, (W)rite, (E)xecute |(R)ead, (W)rite, (E)xecute |(R)ead, (W)rite, (E)xecute |\n-------------------------------------------------------------------------------------------------\n\n000 = 0 (Completely locked)\n001 = 1 (Execute only)\n010 = 2 (Write only)\n011 = 3 (Write and execute)\n100 = 4 (Read only)\n101 = 5 (Read and execute)\n110 = 6 (Read and write)\n111 = 7 (Full access)"
echo -e "$(color 8)-------------------------------------------------------------------------------------------------$(reset)"
echo -e "$(color 8)|$(reset) Owner $(color 8)|$(reset) Group $(color 8)|$(reset) Others $(color 8)|$(reset)"
echo -e "$(color 8)|$(reset)$(color 1)(R)$(reset)ead, $(color 2)(W)$(reset)rite, $(color 3)(E)$(reset)xecute $(color 8)|$(reset)$(color 1)(R)$(reset)ead, $(color 2)(W)$(reset)rite, $(color 3)(E)$(reset)xecute $(color 8)|$(reset)$(color 1)(R)$(reset)ead, $(color 2)(W)$(reset)rite, $(color 3)(E)$(reset)xecute $(color 8)|$(reset)"
echo -e "$(color 8)-------------------------------------------------------------------------------------------------"
echo
echo -e "$(color 1)0$(color 2)0$(color 3)0$(reset) = 0 (Completely locked)\n$(color 1)0$(color 2)0$(color 3)1$(reset) = 1 (Execute only)\n$(color 1)0$(color 2)1$(color 3)0$(reset) = 2 (Write only) \n$(color 1)0$(color 2)1$(color 3)1$(reset) = 3 (Write and execute)\n$(color 1)1$(color 2)0$(color 3)0$(reset) = 4 (Read only)\n$(color 1)1$(color 2)0$(color 3)1$(reset) = 5 (Read and execute)\n$(color 1)1$(color 2)1$(color 3)0$(reset) = 6 (Read and write)\n$(color 1)1$(color 2)1$(color 3)1$(reset) = 7 (Full access)"
echo -e "Enter permissions number desired."
read permnum
pressanykey
Expand Down

0 comments on commit 47f2752

Please sign in to comment.