X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=scripts%2Fdeptest.sh;h=03da9f568e7748311d0814945b2fa0fce82821a8;hb=b0c98d2780fd831d918ccf090485a703a4dc165e;hp=b57612a33238c087fb72a9c19b8dd6d5520f337c;hpb=0bc2052eaeea01983af6aff29dfda496847c0704;p=openwrt.git diff --git a/scripts/deptest.sh b/scripts/deptest.sh index b57612a332..03da9f568e 100755 --- a/scripts/deptest.sh +++ b/scripts/deptest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Automated OpenWrt package dependency checker # @@ -75,6 +75,11 @@ clean_kernel_build_dir() ) } +stamp_exists() # $1=stamp +{ + [ -e "$1" -o -L "$1" ] +} + test_package() # $1=pkgname { local pkg="$1" @@ -88,13 +93,13 @@ test_package() # $1=pkgname local STAMP_FAILED="$STAMP_DIR_FAILED/$pkg" local STAMP_BLACKLIST="$STAMP_DIR_BLACKLIST/$pkg" rm -f "$STAMP_FAILED" - [ -e "$STAMP_SUCCESS" -a $force -eq 0 ] && return + stamp_exists "$STAMP_SUCCESS" && [ $force -eq 0 ] && return rm -f "$STAMP_SUCCESS" [ -n "$SELECTED" ] || { echo "Package $pkg is not selected" return } - [ -e "$STAMP_BLACKLIST" -a $force -eq 0 ] && { + stamp_exists "$STAMP_BLACKLIST" && [ $force -eq 0 ] && { echo "Package $pkg is blacklisted" return }