mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
no dashes in arguments
This commit is contained in:
parent
801911ce2f
commit
524e226fb8
1 changed files with 31 additions and 36 deletions
67
dh
67
dh
|
@ -4,7 +4,6 @@
|
||||||
TEXTDOMAIN=distrohopper
|
TEXTDOMAIN=distrohopper
|
||||||
TEXTDOMAINDIR=/usr/share/locale
|
TEXTDOMAINDIR=/usr/share/locale
|
||||||
export "TEXTDOMAINDIR" "TEXTDOMAIN"
|
export "TEXTDOMAINDIR" "TEXTDOMAIN"
|
||||||
|
|
||||||
# bugs notice
|
# bugs notice
|
||||||
function some_bugs() {
|
function some_bugs() {
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -23,28 +22,28 @@ function some_bugs() {
|
||||||
function show_help() {
|
function show_help() {
|
||||||
echo "DistroHopper v. $version"
|
echo "DistroHopper v. $version"
|
||||||
echo "quickemu v. $("$prefix"quickemu --version)"
|
echo "quickemu v. $("$prefix"quickemu --version)"
|
||||||
echo ""
|
echo " example for First run from terminal: ./dh i && dh s g"
|
||||||
echo $"Possible arguments:"
|
echo $"Possible arguments:"
|
||||||
echo $" -h --help Show this help and exit"
|
echo $" h help Show this help and exit"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -d --dir Set default directory where VMs are stored"
|
echo $" d dir Set default directory where VMs are stored"
|
||||||
echo $" -i --install Install DistroHopper"
|
echo $" i install Install DistroHopper"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -m --mode Portable mode"
|
echo $" m mode Portable mode"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -s --supported Update supported VMs"
|
echo $" s supported Update supported VMs"
|
||||||
echo $" -r --ready Update ready to run VMs"
|
echo $" r ready Update ready to run VMs"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -t --tui Run TUI"
|
echo $" t tui Run TUI"
|
||||||
echo $" -g --gui Run GUI"
|
echo $" g gui Run GUI"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -a --add Add new distro to quickget"
|
echo $" a add Add new distro to quickget"
|
||||||
echo $" -f --functions Sort functions in quickget"
|
echo $" f functions Sort functions in quickget"
|
||||||
echo $" -p --push Push changed quickget to quickemu project #todo"
|
echo $" p push Push changed quickget to quickemu project #todo"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -c --copy Copy all ISOs to target dir (for Ventoy)"
|
echo $" c copy Copy all ISOs to target dir (for Ventoy)"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $" -l --language Translate DistroHopper"
|
echo $" l language Translate DistroHopper"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo $"Homepage: dh.osowoso.xyz"
|
echo $"Homepage: dh.osowoso.xyz"
|
||||||
echo $"Project hosted at: https://github.com/oSoWoSo/DistroHopper"
|
echo $"Project hosted at: https://github.com/oSoWoSo/DistroHopper"
|
||||||
|
@ -68,8 +67,7 @@ function mode_installed() {
|
||||||
prefix=
|
prefix=
|
||||||
export "prefix"
|
export "prefix"
|
||||||
}
|
}
|
||||||
|
# installation ---------------------------
|
||||||
# installation
|
|
||||||
function check_gui_dependencies() {
|
function check_gui_dependencies() {
|
||||||
[ -f "$PREFIX/yad" ] || echo $"Missing yad!"
|
[ -f "$PREFIX/yad" ] || echo $"Missing yad!"
|
||||||
}
|
}
|
||||||
|
@ -168,8 +166,7 @@ function install_process() {
|
||||||
&& echo $"Installing DistroHopper to bin..." \
|
&& echo $"Installing DistroHopper to bin..." \
|
||||||
&& install_dh
|
&& install_dh
|
||||||
}
|
}
|
||||||
|
# basic -----------------------------------
|
||||||
# basic
|
|
||||||
function renew_ready() {
|
function renew_ready() {
|
||||||
cd "$VMS_DIR" || exit 1
|
cd "$VMS_DIR" || exit 1
|
||||||
rm "$DH_CONFIG_DIR"/ready/*.desktop
|
rm "$DH_CONFIG_DIR"/ready/*.desktop
|
||||||
|
@ -374,7 +371,6 @@ Choose other language" | fzf --cycle)
|
||||||
"$prefix"quickemu -vm "$choosed.conf"
|
"$prefix"quickemu -vm "$choosed.conf"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# more
|
# more
|
||||||
function isos_to_dir() {
|
function isos_to_dir() {
|
||||||
yad --file --directory > target
|
yad --file --directory > target
|
||||||
|
@ -443,8 +439,7 @@ function create_translation() {
|
||||||
echo $"Copying translation to '/usr/share/local'..."
|
echo $"Copying translation to '/usr/share/local'..."
|
||||||
sudo cp "$DH_CONFIG_DIR"/locale/distrohopper-"$lang".mo /usr/share/locale/"$lang"/LC_MESSAGES/distrohopper.mo
|
sudo cp "$DH_CONFIG_DIR"/locale/distrohopper-"$lang".mo /usr/share/locale/"$lang"/LC_MESSAGES/distrohopper.mo
|
||||||
}
|
}
|
||||||
|
# run --------------------------------------
|
||||||
# run
|
|
||||||
set_variables
|
set_variables
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
|
@ -456,70 +451,70 @@ while [[ $# -gt 0 ]]
|
||||||
do
|
do
|
||||||
key="$1"
|
key="$1"
|
||||||
case $key in
|
case $key in
|
||||||
-h|--help)
|
h|help)
|
||||||
show_help
|
show_help
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-d|-dir)
|
d|dir)
|
||||||
set_dir
|
set_dir
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-i|--install)
|
i|install)
|
||||||
echo $"Starting installation..."
|
echo $"Starting installation..."
|
||||||
install_process
|
install_process
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-m|--mode)
|
m|mode)
|
||||||
echo $"Switching to portable mode!"
|
echo $"Switching to portable mode!"
|
||||||
mode_portable
|
mode_portable
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-s|--supported)
|
s|supported)
|
||||||
echo $"Updating supported VMs..."
|
echo $"Updating supported VMs..."
|
||||||
renew_supported
|
renew_supported
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-r|--ready)
|
r|ready)
|
||||||
echo $"Updating ready VMs..."
|
echo $"Updating ready VMs..."
|
||||||
renew_ready
|
renew_ready
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-t|--tui)
|
t|tui)
|
||||||
echo $"Running TUI..."
|
echo $"Running TUI..."
|
||||||
run_tui
|
run_tui
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-g|--gui)
|
g|gui)
|
||||||
echo $"Starting DistroHopper GUI..."
|
echo $"Starting DistroHopper GUI..."
|
||||||
run_gui
|
run_gui
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-a|--add)
|
a|add)
|
||||||
echo $"Adding new distro started..."
|
echo $"Adding new distro started..."
|
||||||
add_distro
|
add_distro
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-f|--functions)
|
f|functions)
|
||||||
echo $"Sorting functions in template..."
|
echo $"Sorting functions in template..."
|
||||||
sort_functions
|
sort_functions
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-p|--push)
|
p|push)
|
||||||
echo $"Pushing changes to... #TODO"
|
echo $"Pushing changes to... #TODO"
|
||||||
push_changes
|
push_changes
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-c|--copy)
|
c|copy)
|
||||||
echo $"Copying ISOs to dir. It will take some time..."
|
echo $"Copying ISOs to dir. It will take some time..."
|
||||||
isos_to_dir
|
isos_to_dir
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-e|--test)
|
e|test)
|
||||||
echo $"Running supported test..."
|
echo $"Running supported test..."
|
||||||
renew_supported_test
|
renew_supported_test
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-l|--language)
|
l|language)
|
||||||
create_translation
|
create_translation
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue