diff --git a/install.sh b/install.sh index a1e144dca..7e4669099 100755 --- a/install.sh +++ b/install.sh @@ -127,10 +127,23 @@ case "$reply" in ;; esac -if [[ ${GITHUB_ACTIONS} == "true" ]]; then - apt-get install -qq -y "${pacstall_deps[@]}" -else - apt-get install -y "${pacstall_deps[@]}" +for pkg in "${pacstall_deps[@]}"; do + if ! dpkg -s "${pkg}" > /dev/null 2>&1; then + if [[ ${pkg} == "spdx-licenses" ]]; then + if [[ -z $(apt-cache search --names-only "^${pkg}$") ]]; then + curl -s "http://ftp.debian.org/debian/pool/main/s/${pkg}/${pkg}_3.8+dfsg-3_all.deb" -o "/tmp/${pkg}.deb" && \ + sudo apt install "/tmp/${pkg}.deb" -y && sudo rm -f "/tmp/${pkg}.deb" && continue + fi + fi + to_install+=("${pkg}") + fi +done +if ((${#to_install[@]} != 0)); then + if [[ ${GITHUB_ACTIONS} == "true" ]]; then + apt-get install -qq -y "${to_install[@]}" + else + apt-get install -y "${to_install[@]}" + fi fi METADIR="/var/lib/pacstall/metadata" diff --git a/misc/scripts/update.sh b/misc/scripts/update.sh index da98fb955..d8a4c5965 100755 --- a/misc/scripts/update.sh +++ b/misc/scripts/update.sh @@ -66,6 +66,12 @@ done for pkg in "${pacstall_deps[@]}"; do if ! dpkg -s "${pkg}" > /dev/null 2>&1; then + if [[ ${pkg} == "spdx-licenses" ]]; then + if [[ -z $(apt-cache search --names-only "^${pkg}$") ]]; then + curl -s "http://ftp.debian.org/debian/pool/main/s/${pkg}/${pkg}_3.8+dfsg-3_all.deb" -o "/tmp/${pkg}.deb" && \ + sudo apt install "/tmp/${pkg}.deb" -y && sudo rm -f "/tmp/${pkg}.deb" && continue + fi + fi to_install+=("${pkg}") fi done