From 095163d116113f9e796083eaca7afa6591db3aea Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 15 Oct 2019 14:35:29 +0200 Subject: [PATCH] :wrench: Update gwion-pkg --- scripts/gwion-pkg | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/gwion-pkg b/scripts/gwion-pkg index 0840521e..e268072f 100644 --- a/scripts/gwion-pkg +++ b/scripts/gwion-pkg @@ -43,7 +43,9 @@ install_plug() { echo "installing $2 $3" index=$(printf "%04i" $3) [ -f .gwion-pkg/${index}_$(basename $1 .manifest).so ] && rm .gwion-pkg/${index}_$(basename $1 .manifest).so - ln $PLUG .gwion-pkg/${index}_$(basename $1 .manifest).so + [ -f $PLUG ] || return 1 + ln -s $PLUG .gwion-pkg/${index}_$(basename $1 .manifest).so + return 0 } install_manifest() { @@ -51,8 +53,16 @@ install_manifest() { do [ -d $DIR ] || continue PLUG=$DIR/$(basename $1 .manifest).so - [ -f $PLUG ] || make - install_plug "$1" "$PLUG" $2 + [ -f $PLUG ] || { + [ -f $DIR/Makefile ] || continue; + NAME=$(grep "NAME=" $DIR/Makefile | cut -d= -f2) + BASENAME=$(basename $1 .manifest) + [ $NAME != $BASENAME ] && continue + pushd $DIR + make + popd + } + install_plug "$1" "$PLUG" $2 && break done } -- 2.43.0