aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dorsync11
1 files changed, 11 insertions, 0 deletions
diff --git a/dorsync b/dorsync
index 24ab526..a6b7721 100644
--- a/dorsync
+++ b/dorsync
@@ -41,6 +41,17 @@ bold='\e[01m'
endcolour='\e[0m'
rsyncargs=()
rsyncargs+=" -avHP"
+
+# Check required packages are installed
+deps=(coreutils udisks sed grep rsync)
+for dep in ${deps[@]}; do
+ if ! rpm --quiet -q $dep; then
+ echo "You need to install $dep to run this program"
+ baddep=1
+ fi
+done
+[[ ${#baddep} > 0 ]] && exit 1
+
if [[ -e dorsync.skip ]]; then
while read line; do
rsyncargs+=" --exclude=$line"