diff options
Diffstat (limited to 'paccache-hook.sh')
-rw-r--r-- | paccache-hook.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/paccache-hook.sh b/paccache-hook.sh index 78d48a43ca9e..ce134e7d3a47 100644 --- a/paccache-hook.sh +++ b/paccache-hook.sh @@ -1,13 +1,14 @@ -#!/bin/sh +#!/bin/bash +set -e . /etc/paccache-hook.conf cache_args="" -for cdir in $cache_dirs; do +for cdir in ${cache_dirs[@]}; do cache_args="$cache_args -c $cdir" done -if [ "$installed" = true ]; then +if [ "$installed" = "true" ]; then echo "Removing old installed packages..." if [ -n "$installed_move_to" ]; then paccache $cache_args -m "$installed_move_to" "-k${installed_keep:-2}" $extra_args $installed_extra_args @@ -16,7 +17,7 @@ if [ "$installed" = true ]; then fi fi -if [ "$uninstalled" = true ]; then +if [ "$uninstalled" = "true" ]; then echo "Removing old uninstalled packages..." if [ -n "$uninstalled_move_to" ]; then paccache $cache_args -m "$uninstalled_move_to" "-uk${uninstalled_keep:-0}" $extra_args $uninstalled_extra_args |