10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-01 02:45:29 +02:00
quantum_package/scripts/upgrade/upgrade_ezfio.sh

27 lines
546 B
Bash
Raw Normal View History

2014-11-04 01:03:50 +01:00
#!/bin/bash
#
# Upgrades the EZFIO library from the web.
# Tue Nov 4 00:53:13 CET 2014
2015-06-08 14:49:10 +02:00
if [[ -z ${QP_ROOT} ]]
2014-11-04 01:03:50 +01:00
then
2015-06-08 14:49:10 +02:00
print "The QP_ROOT environment variable is not set."
2014-11-04 01:03:50 +01:00
print "Please reload the quantum_package.rc file."
fi
2015-06-08 14:49:10 +02:00
cd -- ${QP_ROOT}
mv -- ${QP_ROOT}/EZFIO ${QP_ROOT}/EZFIO.old
2014-11-04 01:03:50 +01:00
2015-06-08 14:49:10 +02:00
${QP_ROOT}/scripts/install/install_ezfio.sh
2014-11-04 01:03:50 +01:00
if [[ $? -eq 0 ]]
then
2015-06-08 14:49:10 +02:00
rm -rf -- ${QP_ROOT}/EZFIO.old
2014-11-04 01:03:50 +01:00
echo "Successfully updated EZFIO"
else
2015-06-08 14:49:10 +02:00
rm -rf -- ${QP_ROOT}/EZFIO
mv -- ${QP_ROOT}/EZFIO.old ${QP_ROOT}/EZFIO
2014-11-04 01:03:50 +01:00
echo "Failed to update EZFIO"
fi