2012-01-03 14:49:17 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2010-2012, Asio Software Technologies
|
|
|
|
# Distributed under the terms of the GNU General Public License v3
|
|
|
|
|
|
|
|
|
|
|
|
# Declare basic system variables
|
|
|
|
EZNAME=$(basename ${0})
|
|
|
|
EZROOT=$(dirname $(readlink -ne ${0}))
|
|
|
|
|
|
|
|
# Load necessary files
|
|
|
|
source /etc/profile
|
|
|
|
source ${EZROOT}/libraries/common
|
|
|
|
|
|
|
|
# Load EzBuild libraries & configuration
|
|
|
|
loadLibraries
|
|
|
|
loadConfiguration
|
|
|
|
|
|
|
|
# Print EzBuild notice and parse arguments
|
|
|
|
printNotice
|
2012-01-04 01:28:10 +01:00
|
|
|
until [[ -z "${1}" ]]; do
|
|
|
|
case "${1}" in
|
|
|
|
-c|--cleanlog)
|
|
|
|
printInfo "Clearing log files..."
|
|
|
|
cleanLogs
|
|
|
|
;;
|
|
|
|
-h|--help)
|
|
|
|
printEzsyncUsage
|
|
|
|
;;
|
|
|
|
-p|--purge)
|
|
|
|
printInfo "Clearing temp directory..."
|
|
|
|
cleanTemp
|
|
|
|
;;
|
|
|
|
-P|--purgeonly)
|
|
|
|
printInfo "Clearing temp directory..."
|
|
|
|
cleanTemp
|
|
|
|
quit
|
|
|
|
;;
|
|
|
|
-s|--syscheck)
|
|
|
|
EZOPT_SYSCHECKONLY=1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
die "Unrecognized option ${1}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2012-01-03 14:49:17 +01:00
|
|
|
|
|
|
|
# Check system requirements
|
|
|
|
printInfo "Checking system prerequisites..."
|
|
|
|
checkPrerequisites
|
2012-01-04 01:28:10 +01:00
|
|
|
[ ${?} -ne 0 ] && die "Your environment does not meet EzBuild requirements!"
|
|
|
|
if isEnabled ${EZOPT_SYSCHECKONLY}; then
|
|
|
|
printInfo "Your system meets all EzBuild requirements!"
|
|
|
|
quit
|
|
|
|
fi
|