mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Make sure there are job for quickget to kill. Close #169
This commit is contained in:
parent
2948bac27e
commit
0bfdfe36a0
1 changed files with 13 additions and 7 deletions
18
quickget
18
quickget
|
@ -23,13 +23,11 @@
|
||||||
# }
|
# }
|
||||||
# 6. Add new OS to the argument parser at the bottom of the script
|
# 6. Add new OS to the argument parser at the bottom of the script
|
||||||
|
|
||||||
trap 'kill $(jobs -p)' EXIT
|
function cleanup() {
|
||||||
|
if [ -n "$(jobs -p)" ]; then
|
||||||
if ((BASH_VERSINFO[0] < 4))
|
kill $(jobs -p)
|
||||||
then
|
|
||||||
echo "Sorry, you need bash 4.0 or newer to run this script."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function pretty_name() {
|
function pretty_name() {
|
||||||
local SIMPLE_NAME=""
|
local SIMPLE_NAME=""
|
||||||
|
@ -965,6 +963,14 @@ function get_windows() {
|
||||||
make_vm_config "${FILE_NAME}" "virtio-win.iso"
|
make_vm_config "${FILE_NAME}" "virtio-win.iso"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
if ((BASH_VERSINFO[0] < 4))
|
||||||
|
then
|
||||||
|
echo "Sorry, you need bash 4.0 or newer to run this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
LANGS=()
|
LANGS=()
|
||||||
languages_windows
|
languages_windows
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue