forked from ungleich-public/cdist
update __package_luarocks to new style state checking
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
76a3c20669
commit
9fab782a0c
1 changed files with 16 additions and 19 deletions
|
@ -49,18 +49,15 @@ else
|
|||
state_is="absent"
|
||||
fi
|
||||
|
||||
case "$state" in
|
||||
installed)
|
||||
# Install only if non-existent
|
||||
if [ -z "$is_installed" ]; then
|
||||
# Leave if nothing is to be done
|
||||
[ "$state_is" = "$state_should" ] && exit 0
|
||||
|
||||
case "$state_should" in
|
||||
present)
|
||||
echo luarocks install \"$name\"
|
||||
fi
|
||||
;;
|
||||
removed)
|
||||
# Remove only if existent
|
||||
if [ -n "$is_installed" ]; then
|
||||
absent)
|
||||
echo luarocks remove \"$name\"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unknown state: $state" >&2
|
||||
|
|
Loading…
Reference in a new issue