Big loop refactoring
This commit is contained in:
parent
95c3e6c228
commit
68e148b5fc
378
dh
378
dh
|
@ -4,8 +4,14 @@
|
|||
TEXTDOMAIN=distrohopper
|
||||
TEXTDOMAINDIR=/usr/share/locale
|
||||
export "TEXTDOMAINDIR" "TEXTDOMAIN"
|
||||
# bugs notice
|
||||
function some_bugs() {
|
||||
|
||||
trap 'exit' SIGINT SIGTERM SIGQUIT
|
||||
set -e
|
||||
echo $"DistroHopper is running... Press Ctrl-Q anytime to exit."
|
||||
|
||||
while true
|
||||
do
|
||||
function bugs_notice_show() {
|
||||
echo ""
|
||||
echo $"Done"
|
||||
echo ""
|
||||
|
@ -17,9 +23,9 @@ function some_bugs() {
|
|||
echo ""
|
||||
echo $"Wish you flawless distro hopping..."
|
||||
echo " zenobit"
|
||||
}
|
||||
}
|
||||
|
||||
function show_help() {
|
||||
function help_show() {
|
||||
echo "DistroHopper v. $version"
|
||||
echo "quickemu v. $("$portable_prefix"quickemu --version)"
|
||||
printf $"\texample for First run from terminal: ./dh i && dh s g\n"
|
||||
|
@ -48,39 +54,38 @@ function show_help() {
|
|||
echo $"Homepage: dh.osowoso.xyz"
|
||||
echo $"Project hosted at: https://github.com/oSoWoSo/DistroHopper"
|
||||
echo $"Chat group on SimpleX: https://tinyurl.com/7hm4kcjx"
|
||||
}
|
||||
}
|
||||
|
||||
function portable() {
|
||||
[ -f "$DH_CONFIG" ] && mode_installed || mode_portable
|
||||
}
|
||||
function check_and_set_mode() {
|
||||
[ -f "$DH_CONFIG" ] && work_in_choosed_dir || work_in_current_dir
|
||||
}
|
||||
|
||||
function mode_portable() {
|
||||
function work_in_current_dir() {
|
||||
VMS_DIR="$(pwd)"
|
||||
DH_CONFIG_DIR="$(pwd)"
|
||||
DH_ICON_DIR="$(pwd)/icons"
|
||||
portable_prefix='./'
|
||||
export "VMS_DIR" "DH_CONFIG_DIR" "DH_ICON_DIR" "TERMINAL" "replace" "portable_prefix"
|
||||
}
|
||||
}
|
||||
|
||||
function mode_installed() {
|
||||
function work_in_choosed_dir() {
|
||||
# shellcheck source=distrohopper.conf
|
||||
source "$DH_CONFIG"
|
||||
portable_prefix=''
|
||||
export "portable_prefix"
|
||||
}
|
||||
# installation ---------------------------
|
||||
function check_gui_dependencies() {
|
||||
}
|
||||
|
||||
# installation ---------------------------
|
||||
|
||||
function gui_dependencies_check() {
|
||||
[ -f "$PATH_PREFIX/yad" ] || echo $"Missing yad!"
|
||||
}
|
||||
trap 'exit' SIGINT SIGTERM SIGQUIT
|
||||
set -e
|
||||
echo $"DistroHopper is running... Press Ctrl-Q anytime to exit."
|
||||
}
|
||||
|
||||
function check_tui_dependencies() {
|
||||
function tui_dependencies_check() {
|
||||
[ -f "$PATH_PREFIX/fzf" ] || echo $"Missing fzf!"
|
||||
}
|
||||
}
|
||||
|
||||
function set_variables() {
|
||||
function variables_set() {
|
||||
# DEBUG mod
|
||||
#bash -x ./dh 2>&1 | tee output.log
|
||||
#progname="${progname:="${0##*/}"}"
|
||||
|
@ -95,13 +100,13 @@ function set_variables() {
|
|||
TERMINAL="sakura"
|
||||
replace='"!"'
|
||||
export "DH_CONFIG_DIR" "DH_CONFIG" "replace" "DH_ICON_DIR" "PATH_PREFIX" "TMP_DIR" "TERMINAL"
|
||||
portable
|
||||
check_and_set_mode
|
||||
# Set traps to catch the signals and exit gracefully
|
||||
trap "exit" INT
|
||||
trap "exit" EXIT
|
||||
}
|
||||
}
|
||||
|
||||
function create_desktop_entry() {
|
||||
function desktop_entry_create() {
|
||||
cat <<EOF > ${DESKTOP_FILE}
|
||||
[Desktop Entry]
|
||||
Version=$version
|
||||
|
@ -120,58 +125,44 @@ MimeType=$mime
|
|||
Keywords=$keyword
|
||||
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
function create_structure() {
|
||||
function directory_structure_create() {
|
||||
source distrohopper.conf
|
||||
echo $"creating config dir..."
|
||||
mkdir -p "$DH_CONFIG_DIR"
|
||||
echo $"creating icons dir as root..."
|
||||
mkdir -p "$DH_ICON_DIR" >/dev/null 2>&1 || sudo mkdir -p "$DH_ICON_DIR"
|
||||
}
|
||||
}
|
||||
|
||||
function dh_desktop_entry() {
|
||||
function desktop_entry_distrohopper() {
|
||||
echo $"Do you want DistroHopper to run in the terminal? (y/n)"
|
||||
run_in_terminal
|
||||
DESKTOP_FILE="${TMP_DIR}/dh.desktop"
|
||||
type='Application'
|
||||
name='DistroHopper'
|
||||
comment='Quickly download, create and run VM of any#TODO operating system.'
|
||||
version='0.77b'
|
||||
execmd="sh -c 'cd ${VMS_DIR} && dh g'"
|
||||
if [ "$interminal" == "yes" ]; then
|
||||
cat <<EOF > ${TMP_DIR}/dh.desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=DistroHopper
|
||||
Description=Quickly download, create and run VM of any#TODO operating system.
|
||||
version=0.77b
|
||||
Terminal=true
|
||||
Exec=sh -c 'cd ${VMS_DIR} && dh g'
|
||||
Icon=/home/zen/git/distrohopper/icons/hop
|
||||
Categories=System;Virtualization;
|
||||
|
||||
EOF
|
||||
else
|
||||
cat <<EOF > ${TMP_DIR}/dh.desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=DistroHopper
|
||||
Description=Quickly download, create and run VM of any#TODO operating system.
|
||||
version=0.77b
|
||||
Exec=sh -c 'cd ${VMS_DIR} && dh g'
|
||||
Icon=/home/zen/git/distrohopper/icons/hop
|
||||
Categories=System;Virtualization;
|
||||
|
||||
EOF
|
||||
terminal='true'
|
||||
fi
|
||||
icon='hop'
|
||||
categories='System;Virtualization;'
|
||||
desktop_entry_create
|
||||
sudo cp ${TMP_DIR}/dh.desktop /usr/share/applications/
|
||||
}
|
||||
}
|
||||
|
||||
function set_dir() {
|
||||
function virtual_machines_directory_choose() {
|
||||
NEWDIR="$(yad --width=900 --height=900 --file --directory --title="Where to save VMs?")"
|
||||
VMS_DIR="$NEWDIR"
|
||||
echo "VMS_DIR=\"$VMS_DIR\"
|
||||
export \"VMS_DIR\"" >> "$DH_CONFIG"
|
||||
export "VMS_DIR"
|
||||
}
|
||||
}
|
||||
|
||||
function install_prereq() {
|
||||
# Find the current distribution and install dependecies
|
||||
function dependencies_install() {
|
||||
# Find the current distribution and install dependecies
|
||||
if [ -f /etc/os-release ]; then
|
||||
if grep -q arch /etc/os-release; then
|
||||
sudo pacman -S cdrtools coreutils edk2-ovmf grep jq procps python3 qemu-full sed socat spice-gtk swtpm usbutils util-linux wget xdg-user-dirs xorg-xrandr zsync getext yad fzf
|
||||
|
@ -196,9 +187,9 @@ function install_prereq() {
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
function install_dh() {
|
||||
function distrohopper_install() {
|
||||
cp dh quickget quickemu macrecovery windowskey "$PATH_PREFIX" >/dev/null 2>&1 || sudo cp dh quickget quickemu macrecovery windowskey "$PATH_PREFIX"
|
||||
# quickget also to config directory for adding new distros...
|
||||
cp quickget "$DH_CONFIG_DIR/"
|
||||
|
@ -208,41 +199,42 @@ function install_dh() {
|
|||
cp -r ready "$DH_CONFIG_DIR/"
|
||||
cp -r supported "$DH_CONFIG_DIR/"
|
||||
cp -r locale "$DH_CONFIG_DIR/"
|
||||
}
|
||||
}
|
||||
|
||||
function install_process() {
|
||||
check_tui_dependencies
|
||||
check_gui_dependencies
|
||||
function installation_process() {
|
||||
tui_dependencies_check
|
||||
gui_dependencies_check
|
||||
#check_quickemu_dependencies
|
||||
echo $"Creating directory structure..." \
|
||||
&& create_structure \
|
||||
&& directory_structure_create \
|
||||
&& echo $"Setting up directory..." \
|
||||
&& set_dir \
|
||||
&& virtual_machines_directory_choose \
|
||||
&& echo $"Installing needed..." \
|
||||
&& install_prereq \
|
||||
&& dependencies_install \
|
||||
&& echo $"Installing DistroHopper to bin..." \
|
||||
&& install_dh \
|
||||
&& distrohopper_install \
|
||||
&& echo $"Copying desktop entry..." \
|
||||
&& dh_desktop_entry
|
||||
}
|
||||
# basic -----------------------------------
|
||||
&& desktop_entry_distrohopper
|
||||
}
|
||||
|
||||
function run_in_terminal() {
|
||||
# basic -----------------------------------
|
||||
|
||||
function run_in_terminal() {
|
||||
read -r response
|
||||
if [[ "$response" =~ ^[YyAa]$ ]]; then
|
||||
interminal="yes"
|
||||
else
|
||||
interminal="no"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
function renew_ready() {
|
||||
function virtual_machines_update_ready() {
|
||||
cd "$VMS_DIR" || exit 1
|
||||
# for files in "$VMS_DIR"/*; do
|
||||
# if [ ! -e *.conf ]; then
|
||||
# echo $"No .conf files found"
|
||||
# return
|
||||
# fi
|
||||
# for files in "$VMS_DIR"/*; do
|
||||
# if [ ! -e *.conf ]; then
|
||||
# echo $"No .conf files found"
|
||||
# return
|
||||
# fi
|
||||
for vm_conf in *.conf; do
|
||||
if [ "$vm_conf" == "distrohopper.conf" ]; then
|
||||
continue # skip processing distrohopper.conf
|
||||
|
@ -258,20 +250,19 @@ function renew_ready() {
|
|||
elif [ -z "$icon_file" ]; then
|
||||
icon_file="$DH_ICON_DIR/tux.svg"
|
||||
fi
|
||||
# content of desktop files (ready to run VMs)
|
||||
cat <<EOF > "$DH_CONFIG_DIR"/ready/"$vm_desktop".desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=$vm_desktop
|
||||
Exec=sh -c 'cd ${VMS_DIR} && ${portable_prefix}quickemu -vm ${vm_conf}'
|
||||
Icon=$icon_file
|
||||
Categories=System;Virtualization;
|
||||
|
||||
EOF
|
||||
DESKTOP_FILE="$DH_CONFIG_DIR/ready/$vm_desktop.desktop"
|
||||
type='Application'
|
||||
name="$vm_desktop"
|
||||
comment='Quickly download, create and run VM of any#TODO operating system.'
|
||||
version='0.77b'
|
||||
execmd="sh -c 'cd ${VMS_DIR} && ${portable_prefix}quickemu -vm ${vm_conf}'"
|
||||
icon="$icon_file"
|
||||
categories='System;Virtualization;'
|
||||
desktop_entry_create
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
function renew_supported() {
|
||||
function virtual_machines_update_supported() {
|
||||
echo $"Do you want quickget to show outputs in the terminal? (y/n)"
|
||||
run_in_terminal
|
||||
# get supported VMs
|
||||
|
@ -291,45 +282,54 @@ function renew_supported() {
|
|||
echo $"Creating $vm_desktop desktop entry..."
|
||||
echo ""
|
||||
# Check if there are editions
|
||||
DESKTOP_FILE="$DH_CONFIG_DIR/supported/$vm_desktop.desktop"
|
||||
type='Application'
|
||||
name="$get_name"
|
||||
releases=$releases
|
||||
replace=$replace
|
||||
if [ -z "$editions" ]; then
|
||||
cat <<EOF > "$DH_CONFIG_DIR"/supported/"$vm_desktop".desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=$get_name
|
||||
releases=$releases
|
||||
replace=$replace
|
||||
Exec=sh -c 'cd "$VMS_DIR" && yad --form --field="Release:CB" "${releases// /$replace}" | cut -d"|" -f1 | xargs -I{} sh -c "${portable_prefix}quickget $get_name {}"'
|
||||
Icon=$icon_file
|
||||
Categories=System;Virtualization;
|
||||
|
||||
EOF
|
||||
execmd="sh -c 'cd $VMS_DIR && yad --form --field=\"Release:CB\" \"${releases// /$replace}\" | cut -d\'|\' -f1 | xargs -I{} sh -c \"${portable_prefix}quickget $get_name {}\"'"
|
||||
elif [ "$interminal" == "yes" ]; then
|
||||
terminal='true'
|
||||
else
|
||||
cat <<EOF > "$DH_CONFIG_DIR"/supported/"$vm_desktop".desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=$get_name
|
||||
releases=$releases
|
||||
editions=$editions
|
||||
replace=$replace
|
||||
Exec=sh -c 'cd $VMS_DIR && yad --form --separator=" " --field="Release:CB" "${releases// /$replace}" --field="Edition:CB" "${editions// /$replace}" | xargs -I{} sh -c "${portable_prefix}quickget $get_name {}"'
|
||||
Icon=$icon_file
|
||||
Categories=System;Virtualization;
|
||||
|
||||
EOF
|
||||
editions=$editions
|
||||
execcmd="sh -c 'cd $VMS_DIR && yad --form --separator=\" \" --field=\"Release:CB\" \"${releases// /$replace}\" --field=\"Edition:CB\" \"${editions// /$replace}\" | xargs -I{} sh -c \"${portable_prefix}quickget $get_name {}\"'"
|
||||
fi
|
||||
done < "$DH_CONFIG_DIR"/supported.md
|
||||
}
|
||||
icon='hop'
|
||||
categories='System;Virtualization;'
|
||||
|
||||
function run_gui() {
|
||||
check_gui_dependencies
|
||||
desktop_entry_create
|
||||
done < "$DH_CONFIG_DIR"/supported.md
|
||||
}
|
||||
|
||||
function distrohopper_run_gui() {
|
||||
gui_dependencies_check
|
||||
key=$((RANDOM % 9000 + 1000))
|
||||
yad --plug="$key" --tabnum=1 --monitor --icons --listen --read-dir="$DH_CONFIG_DIR"/ready --sort-by-name --no-buttons --borders=0 --icon-size=46 --item-width=76 &
|
||||
yad --plug="$key" --tabnum=2 --monitor --icons --listen --read-dir="$DH_CONFIG_DIR"/supported --sort-by-name --no-buttons --borders=0 --icon-size=46 --item-width=76 &
|
||||
yad --dynamic --notebook --key="$key" --monitor --listen --window-icon="$DH_ICON_DIR"/hop.svg --width=900 --height=900 --title="DistroHopper" --tab="run VM" --tab="download VM"
|
||||
}
|
||||
}
|
||||
|
||||
function run_tui() {
|
||||
check_tui_dependencies
|
||||
function distrohopper_run_tui() {
|
||||
tui_dependencies_check
|
||||
tui_run
|
||||
if [ "$todo" = "create" ]; then
|
||||
virtual_machine_create
|
||||
tui_windows
|
||||
tui_get_releases_and_editions
|
||||
tui_get_releases
|
||||
if [ "$(echo "$choices" | wc -l)" = 1 ]; then
|
||||
tui_downloading
|
||||
else
|
||||
tui_get_editions
|
||||
tui_downloading_with_edition
|
||||
fi
|
||||
fi
|
||||
virtual_machine_choose_to_run
|
||||
virtual_machine_run
|
||||
}
|
||||
|
||||
tui_run() {
|
||||
cd "$VMS_DIR" || exit 1
|
||||
vms=(*.conf)
|
||||
printf $" Prepared VMs:\n-------------\n\n"
|
||||
|
@ -350,17 +350,41 @@ function run_tui() {
|
|||
todo="create"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# If the user chose to create a new VM
|
||||
if [ "$todo" = "create" ]; then
|
||||
virtual_machine_create() {
|
||||
os=$("$portable_prefix"quickget | sed 1d | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose OS to download
|
||||
or CTRL-c or ESC to quit')
|
||||
}
|
||||
|
||||
# If the OS is Windows
|
||||
tui_get_releases_and_editions() {
|
||||
choices=$("$portable_prefix"quickget "$os" | sed 1d)
|
||||
}
|
||||
|
||||
tui_get_releases() {
|
||||
release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release
|
||||
or CTRL-c or ESC to quit')
|
||||
}
|
||||
|
||||
tui_get_editions() {
|
||||
edition=$(echo "$choices" | grep 'Editions' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Edition
|
||||
or CTRL-c or ESC to quit')
|
||||
}
|
||||
|
||||
tui_downloading() {
|
||||
printf $"\n Trying to download %s %s...\n\n" "$os" "$release"
|
||||
"$portable_prefix"quickget "$os" "$release"
|
||||
}
|
||||
|
||||
tui_downloading_with_edition() {
|
||||
printf $"\n Trying to download %s %s %s...\n\n" "$os" "$release" "$edition"
|
||||
"$portable_prefix"quickget "$os" "$release" "$edition"
|
||||
}
|
||||
|
||||
tui_windows() {
|
||||
if [ "$os" = windows ]; then
|
||||
answer=$(echo "Default English
|
||||
Choose other language" | fzf --cycle)
|
||||
|
||||
# If the user wants another windows language
|
||||
if [ "$answer" = "Choose other language" ]; then
|
||||
wrelease=$(echo "8
|
||||
|
@ -379,53 +403,28 @@ Choose other language" | fzf --cycle)
|
|||
"$portable_prefix"quickget "windows" "$wrelease" "$wlang"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the release and edition to download, if necessary
|
||||
choices=$("$portable_prefix"quickget "$os" | sed 1d)
|
||||
|
||||
if [ "$(echo "$choices" | wc -l)" = 1 ]; then
|
||||
|
||||
# get release
|
||||
release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release
|
||||
virtual_machine_choose_to_run() {
|
||||
choosed=$(echo "$(ls ***.conf 2>/dev/null | sed 's/\.conf$//')" | fzf --cycle --header='Choose VM to run
|
||||
or CTRL-c or ESC to quit')
|
||||
}
|
||||
|
||||
# downloading
|
||||
printf $"\n Trying to download %s %s...\n\n" "$os" "$release"
|
||||
"$portable_prefix"quickget "$os" "$release"
|
||||
else
|
||||
|
||||
# get release
|
||||
release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release
|
||||
or CTRL-c or ESC to quit')
|
||||
|
||||
# get edition
|
||||
edition=$(echo "$choices" | grep 'Editions' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Edition
|
||||
or CTRL-c or ESC to quit')
|
||||
|
||||
# downloading
|
||||
printf $"\n Trying to download %s %s %s...\n\n" "$os" "$release" "$edition"
|
||||
"$portable_prefix"quickget "$os" "$release" "$edition"
|
||||
fi
|
||||
|
||||
# choose VM to run
|
||||
choosed=$(echo "$(ls ./***.conf 2>/dev/null | sed 's/\.conf$//')" | fzf --cycle --header='Choose VM to run
|
||||
or CTRL-c or ESC to quit')
|
||||
|
||||
# Run choosed VM
|
||||
virtual_machine_run() {
|
||||
printf $"\n Starting %s...\n\n" "$choosed"
|
||||
"$portable_prefix"quickemu -vm "$choosed.conf"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
# more
|
||||
function isos_to_dir() {
|
||||
# more
|
||||
|
||||
function isos_copy_to_dir() {
|
||||
yad --width=900 --height=900 --file --directory > target
|
||||
cd "$VMS_DIR" || exit 1
|
||||
# shellcheck disable=2154
|
||||
cp ./*glob*/*.iso "$target"
|
||||
}
|
||||
# shellcheck disable=2086
|
||||
function add_distro() {
|
||||
}
|
||||
# shellcheck disable=2086
|
||||
function add_distro() {
|
||||
yad --form --field="Pretty name" "" --field="Name" "" --field="Releases" "" --field="Editions" "" --field="URL" "" --field="ISO" "" --field="Checksum file" "" > ${TMP_DIR}/template.tmp
|
||||
PRETTY_NAME="$(cat ${TMP_DIR}/template.tmp | cut -d'|' -f1)"
|
||||
NAME="$(cat ${TMP_DIR}/template.tmp | cut -d'|' -f2)"
|
||||
|
@ -468,9 +467,9 @@ function get_$NAME() {
|
|||
EOF
|
||||
echo "Done"
|
||||
meld "${TMP_DIR}"/template.tmp "$DH_CONFIG_DIR"/quickget
|
||||
}
|
||||
}
|
||||
|
||||
function sort_functions() {
|
||||
function sort_functions() {
|
||||
#TODO
|
||||
# Get the name of the script from the command line argument
|
||||
script_name=$1
|
||||
|
@ -484,9 +483,9 @@ function sort_functions() {
|
|||
# Print the function definition to stdout
|
||||
grep -A "$(wc -l < "$script_name")" -w "function $function_name" "$script_name"
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
function translate() {
|
||||
function translate() {
|
||||
echo $"Which language change? (en/cs)"
|
||||
echo $"If you want create new one, insert two digit language code..."
|
||||
read lang
|
||||
|
@ -503,56 +502,57 @@ function translate() {
|
|||
echo $"Copying translation to '/usr/share/local'..."
|
||||
sudo cp "$DH_CONFIG_DIR"/locale/distrohopper-"$lang".mo /usr/share/locale/"$lang"/LC_MESSAGES/distrohopper.mo
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
# run --------------------------------------
|
||||
set_variables
|
||||
# run --------------------------------------
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
variables_set
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
printf $"No argumet provided!\n\n"
|
||||
show_help
|
||||
fi
|
||||
help_show
|
||||
fi
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case $key in
|
||||
h|help)
|
||||
show_help
|
||||
help_show
|
||||
shift
|
||||
;;
|
||||
d|dir)
|
||||
set_dir
|
||||
virtual_machines_directory_choose
|
||||
shift
|
||||
;;
|
||||
i|install)
|
||||
echo $"Starting installation..."
|
||||
install_process
|
||||
installation_process
|
||||
shift
|
||||
;;
|
||||
m|mode)
|
||||
echo $"Switching to portable mode!"
|
||||
mode_portable
|
||||
work_in_current_dir
|
||||
shift
|
||||
;;
|
||||
s|supported)
|
||||
echo $"Updating supported VMs..."
|
||||
renew_supported
|
||||
virtual_machines_update_supported
|
||||
shift
|
||||
;;
|
||||
r|ready)
|
||||
echo $"Updating ready VMs..."
|
||||
renew_ready
|
||||
virtual_machines_update_ready
|
||||
shift
|
||||
;;
|
||||
t|tui)
|
||||
echo $"Running DistroHopper TUI..."
|
||||
run_tui
|
||||
distrohopper_run_tui
|
||||
shift
|
||||
;;
|
||||
g|gui)
|
||||
echo $"Starting DistroHopper GUI..."
|
||||
run_gui
|
||||
distrohopper_run_gui
|
||||
shift
|
||||
;;
|
||||
a|add)
|
||||
|
@ -572,7 +572,7 @@ do
|
|||
;;
|
||||
c|copy)
|
||||
echo $"Copying ISOs to dir. It will take some time..."
|
||||
isos_to_dir
|
||||
isos_copy_to_dir
|
||||
shift
|
||||
;;
|
||||
l|language)
|
||||
|
@ -580,18 +580,20 @@ do
|
|||
shift
|
||||
;;
|
||||
z)
|
||||
WIP
|
||||
run_tui_new
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo $"Invalid option: $1"
|
||||
echo ""
|
||||
show_help
|
||||
help_show
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
bugs_notice_show
|
||||
|
||||
exit 0
|
||||
|
||||
done
|
||||
|
||||
some_bugs
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue