Skip to content

Commit

Permalink
Rewrite assert_one_dir function to not crash on a native build machine
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19107 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed May 5, 2010
1 parent d7cf97f commit 5453e54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packaging/win32/functions.sh
Expand Up @@ -182,8 +182,12 @@ function set_env() {

function assert_one_dir() {
counted=$(ls -d "$@" 2>/dev/null | wc -l)
[[ $counted -eq 0 ]] && die "Exactly one directory is required, but detected $counted; please check why $@ wasn't created"
[[ $counted -gt 1 ]] && die "Exactly one directory is required, but detected $counted; please delete all but the latest one: $@"
if [[ $counted -eq 0 ]]; then
die "Exactly one directory is required, but detected $counted; please check why $@ wasn't created"
fi
if [[ $counted -gt 1 ]]; then
die "Exactly one directory is required, but detected $counted; please delete all but the latest one: $@"
fi
}

function fix_pkgconfigprefix() {
Expand Down

0 comments on commit 5453e54

Please sign in to comment.