-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
68 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.swp | ||
error.log | ||
notes.txt | ||
.notes.txt.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!bin/bash | ||
|
||
function ReadArguments() { | ||
# Python functions (soon to be moved out) | ||
UsdArs="/usr/bin/functions/usd-ars.py" | ||
|
||
# Base options when no arguments is passed | ||
options=(DiskUsage DeleteTemporary EmptyRecycleBin UninstallPackage SystemInfo MemoryUsage Uptime OpenPorts GetWeather DownloadVideo FindFile $UsdArs exit) | ||
|
||
local arguments="$1" | ||
for arg in "$arguments"; do | ||
if [[ $arg == "--help" ]]; then | ||
source /usr/bin/constants/help.sh # Look for a way to not source this file again | ||
for description in "${descriptions[@]}"; do | ||
echo "$description" | ||
done | ||
exit | ||
fi | ||
|
||
# Check if the language is Spanish | ||
if [[ $arg == "--esp" ]]; then | ||
language="esp" | ||
prompt="Ingrese una opción: " | ||
menu_options=("${menu_options_spanish[@]}") | ||
continue | ||
fi | ||
|
||
# Menu choice for the system utilities | ||
if [[ $arg == "--system" || $arg == "--sys" ]]; then | ||
options=(DiskUsage SystemInfo UninstallPackage Uptime OpenPorts MemoryUsage exit) | ||
menu_options=( | ||
"1) Analyze disk usage" | ||
"2) System information" | ||
"3) Uninstall a package" | ||
"4) System uptime" | ||
"5) Open ports" | ||
"6) Memory usage" | ||
"7) Exit" | ||
) | ||
continue | ||
fi | ||
|
||
# Otherwise, store the argument in the array | ||
args+=("$arg") | ||
done | ||
} | ||
|
||
export -f ReadArguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters