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"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/flavor" ]; then
|
||||
flavor="$(cat "$__object/parameter/flavor")"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/version" ]; then
|
||||
version="$(cat "$__object/parameter/version")"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/pkgsite" ]; then
|
||||
pkgsite="$(cat "$__object/parameter/pkgsite")"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/state" ]; then
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
else
|
||||
state="present"
|
||||
fi
|
||||
flavor="$(cat "$__object/parameter/flavor")"
|
||||
version="$(cat "$__object/parameter/version")"
|
||||
pkgsite="$(cat "$__object/parameter/pkgsite")"
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
curr_version="$(cat "$__object/explorer/pkg_version")"
|
||||
add_cmd="pkg_add"
|
||||
rm_cmd="pkg_delete"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
present
|
Loading…
Reference in a new issue