mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
update get windows function
removed option to choose language quickemu 4.8
This commit is contained in:
parent
b8bf944f2e
commit
9d0bf661c5
1 changed files with 28 additions and 45 deletions
27
quickfzf
27
quickfzf
|
@ -60,27 +60,14 @@ esac
|
|||
# If the user chose to create a new VM
|
||||
if [ "$todo" = "create" ]; then
|
||||
os=$(quickget | sed 1d | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose OS to download')
|
||||
# If the OS is 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
|
||||
10
|
||||
11" | fzf --cycle)
|
||||
# get window language list
|
||||
wlend=$(($(cat $QUICKGET | sed '/Arabic/,$!d' | grep -n '}' | cut -d':' -f1 | head -n 1) - 1))
|
||||
# get windows language
|
||||
wlang=$(cat $QUICKGET | sed '/Arabic/,$!d' | head -n $wlend | cut -d'=' -f2 | tail -c +2 | head -c -2 | sed 's/^[ \t]*//' | fzf --cycle --header='Choose Language')
|
||||
# downloading windows
|
||||
printf '\n Trying to download Windows %s %s...\n\n' "$wrelease" "$wlang"
|
||||
quickget "windows" "$wrelease" "$wlang"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get the release and edition to download, if necessary
|
||||
choices=$(quickget "$os" | sed 1d)
|
||||
if [ "$(echo "$choices" | wc -l)" = 1 ]; then
|
||||
if [ "$todo" = "edit" ]; then
|
||||
editconfig=$(ls | grep '.conf' | fzf --cycle --header='Choose config to edit')
|
||||
"$EDITOR" "$editconfig"
|
||||
elif [ "$(echo "$choices" | wc -l)" = 1 ]; then
|
||||
# get release
|
||||
release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release')
|
||||
# downloading
|
||||
|
@ -95,10 +82,6 @@ Choose other language" | fzf --cycle)
|
|||
printf '\n Trying to download %s %s %s...\n\n' "$os" "$release" "$edition"
|
||||
quickget "$os" "$release" "$edition"
|
||||
fi
|
||||
elif [ "$todo" = "edit" ]; then
|
||||
editconfig=$(ls | grep '.conf' | fzf --cycle --header='Choose config to edit')
|
||||
"$EDITOR" "$editconfig"
|
||||
fi
|
||||
|
||||
# choose VM to run
|
||||
chosen=$(echo "$(ls *.conf 2>/dev/null | sed 's/\.conf$//')" | fzf --cycle --header='Choose VM to run')
|
||||
|
|
Loading…
Reference in a new issue