#!/bin/bash #################################### ####### colors ##################### green="\033[01;32m" red="\033[01;31m" restore="\033[00m" contrast="\033[1m" #################################### echo URL="http://gpo.zugaina.org" #################################### ####### search ##################### search(){ for page in ${PAGES};do OUT="$(curl -s ${URL}/${page})" OVERLAYS="$(grep -o "Overlays/.*\"" <<< "${OUT}" | sed 's|Overlays/||;s|"||' | sort -u)" VERSIONS="$(grep -o "[^ ]*||;s|${PN}-${ver}<\/b>/,/<\/li>/p" <<< "${OUT}" | grep -o "Overlays/.*\"" | sed 's|Overlays/||;s|"||' | sort -u)" FULL+="${CATEGORY}/${PN}-${ver}:"${overlays//$'\n'/ }$'\n' done done } #################################### ####### go ######################### if [[ "${1}" == "-e" ]] && grep -q \/ <<< "${2}";then PAGES="${2}" CATEGORY="$(awk -F '/' '{print $1}' <<< "${2}")" PN="$(awk -F '/' '{print $2}' <<< "${2}")" desc="$(curl -s ${URL}/${2} | grep -o "