diff --git a/build_and_install.sh b/build_and_install.sh index d769314..9d3efa2 100755 --- a/build_and_install.sh +++ b/build_and_install.sh @@ -60,7 +60,13 @@ cssh=ssh echo echo "Install the app" -$cssh $TARGET "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin /usr/sbin/upload_apkg -rapp.bin -d -f1 -g1 && echo 'SUCCESS!'" +ALREADY_INSTALLED=$($cssh $TARGET "del_apkg whatever | grep ${PACKAGE}") +if [ -n "${ALREADY_INSTALLED}" ]; then + $cssh $TARGET "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin /usr/sbin/upload_apkg -rapp.bin -d -f1 -g1 && echo 'SUCCESS!'" +else + echo "Warning: this usually doesn't work!" + $cssh $TARGET "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin /usr/sbin/upload_apkg -papp.bin -t2 -d -f0 -g1 && echo 'SUCCESS!'" +fi TEST=tests/$PACKAGE/test.sh