Remove dependency on deprecated helpers script

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
This commit is contained in:
Tudor Marcu
2017-03-02 14:27:40 -08:00
parent 7e7982d043
commit 75aada8482
+10 -6
View File
@@ -27,12 +27,6 @@
# mixer-pack-maker.sh --to 7000 --from 6900 --zero
#
if [ ! -f /usr/share/mixer-tools/helpers ]; then
echo "Cannot find /usr/share/mixer-tools/helpers, please install first, exiting..."
exit
fi
source /usr/share/mixer-tools/helpers
FROM_VERS=""
REPO_DIR=""
STATE_DIR=/var/lib/update
@@ -52,6 +46,16 @@ usage() {
echo -e "\t-z, --zero-packs\tCreate zero packs. If only --to is specified, this is the default.\n"
}
check_dep() {
set +e
type $1 &> /dev/null
if [ $? -ne 0 ]; then
echo "$1 program not found... Unable to continue"
exit 1
fi
set -e
}
error() {
echo -e "ERROR: $1\n"
}