permite elegir que distro descargar en vez de todas

master
fanta 2 years ago
parent 6c1de8eea3
commit 752275bc50

14
q

@ -3,6 +3,7 @@ vmsDir="$HOME/vms"
function main(){
downloadSysList
filterList
downloadSysIsos
showVms
}
@ -12,6 +13,19 @@ function downloadSysList(){
wget --no-check-certificate -q "http://fanta.56k.es/q/systems.lst" -O $vmsDir/.systems.lst
}
function filterList(){
cat -n $vmsDir/.systems.lst | cut -d ";" -f 1,2 | tr ";" " "
echo " "
read -p "Number: " option
if [[ $option == ?(-)+([0-9]) ]] ; then
cat $vmsDir/.systems.lst | head -$option | tail -1 > $vmsDir/.systems2.lst
mv $vmsDir/.systems2.lst $vmsDir/.systems.lst
else
echo -e "\nError: Try again and enter a integer number my friend"
exit
fi
}
function downloadSysIsos(){
while read system; do
data=("$(echo "$system" | cut -d ";" -f 1)" "$(echo "$system" | cut -d ";" -f 2)" "$(echo "$system" | cut -d ";" -f 3)" "$(echo "$system" | cut -d ";" -f 4)" "$(echo "$system" | cut -d ";" -f 5)" "$(echo "$system" | cut -d ";" -f 6)" "$(echo "$system" | cut -d ";" -f 7)" "$(echo "$system" | cut -d ";" -f 8)")

Loading…
Cancel
Save