DRY: Remove default parameter value handeling in __package_pkg_freebsd
flavor, pkgsite and version are expected to be empty. They're all checked with [ -n "$var" ]
This commit is contained in:
parent
9fd285da4c
commit
f7bf6a058e
5 changed files with 5 additions and 17 deletions
|
@ -51,23 +51,10 @@ else
|
||||||
name="$__object_id"
|
name="$__object_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$__object/parameter/flavor" ]; then
|
|
||||||
flavor="$(cat "$__object/parameter/flavor")"
|
flavor="$(cat "$__object/parameter/flavor")"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$__object/parameter/version" ]; then
|
|
||||||
version="$(cat "$__object/parameter/version")"
|
version="$(cat "$__object/parameter/version")"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$__object/parameter/pkgsite" ]; then
|
|
||||||
pkgsite="$(cat "$__object/parameter/pkgsite")"
|
pkgsite="$(cat "$__object/parameter/pkgsite")"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$__object/parameter/state" ]; then
|
|
||||||
state="$(cat "$__object/parameter/state")"
|
state="$(cat "$__object/parameter/state")"
|
||||||
else
|
|
||||||
state="present"
|
|
||||||
fi
|
|
||||||
curr_version="$(cat "$__object/explorer/pkg_version")"
|
curr_version="$(cat "$__object/explorer/pkg_version")"
|
||||||
add_cmd="pkg_add"
|
add_cmd="pkg_add"
|
||||||
rm_cmd="pkg_delete"
|
rm_cmd="pkg_delete"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
present
|
Loading…
Reference in a new issue