finish
This commit is contained in:
parent
05bf2a4cdf
commit
32cfb2a7a4
@ -21,13 +21,13 @@ function iso_extract() {
|
|||||||
return 12
|
return 12
|
||||||
}
|
}
|
||||||
|
|
||||||
iso_source_is_url=false
|
|
||||||
iso_source="$1"
|
iso_source="$1"
|
||||||
[ -f "$iso_source" ] || {
|
[ -f "$iso_source" ] || {
|
||||||
#if it is an url...
|
#if it is an url...
|
||||||
if [ url-exist ]; then
|
if [ "`check_url $iso_source`" == "true" ]; then
|
||||||
iso_source_is_url=true
|
|
||||||
#dl to tmp + set iso_source
|
#dl to tmp + set iso_source
|
||||||
|
iso_tmp="`mktemp --suffix=.iso`"; rm "$iso_tmp"
|
||||||
|
wget -O "$iso_tmp" "$iso_source"
|
||||||
else
|
else
|
||||||
echo "### ERROR ### iso_extract: ISO \"$iso_source\" not exist!"
|
echo "### ERROR ### iso_extract: ISO \"$iso_source\" not exist!"
|
||||||
return 11
|
return 11
|
||||||
@ -49,7 +49,7 @@ function iso_extract() {
|
|||||||
#clear tmp mountpoint
|
#clear tmp mountpoint
|
||||||
umount "$iso_source"
|
umount "$iso_source"
|
||||||
rm -r "$tmpdir"
|
rm -r "$tmpdir"
|
||||||
[ "$iso_source_is_url" == "true" ] && rm "$iso_source"
|
[ -n "$iso_tmp" ] && rm "$iso_tmp"
|
||||||
tmpdir=
|
tmpdir=
|
||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
|
Loading…
Reference in New Issue
Block a user