add logic

This commit is contained in:
6543 2018-05-22 01:34:32 +02:00
parent 7d4c1015d5
commit 2a081ad517

View File

@ -21,10 +21,17 @@ 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 [ url-exist ]; then
iso_source_is_url=true
#dl to tmp + set iso_source
else
echo "### ERROR ### iso_extract: ISO \"$iso_source\" not exist!" echo "### ERROR ### iso_extract: ISO \"$iso_source\" not exist!"
return 11 return 11
fi
} }




@ -42,6 +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"
tmpdir= tmpdir=


echo "done" echo "done"