mirror of
https://git.56k.es/fanta/q.git
synced 2024-05-29 10:43:32 +02:00
permite elegir que distro descargar en vez de todas
This commit is contained in:
parent
6c1de8eea3
commit
752275bc50
14
q
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…
Reference in New Issue
Block a user