DRY: Remove default parameter value handeling in __apt_source

This commit is contained in:
Antoine Catton 2014-12-27 20:11:14 -07:00
parent 17afb5f5ad
commit 82f48ef271
3 changed files with 4 additions and 10 deletions

View file

@ -19,19 +19,11 @@
# #
# The marker file is established in the docs, but it isn't obligatory. # The marker file is established in the docs, but it isn't obligatory.
if [ -f "$__object/parameter/destination" ]; then destination="$(cat "$__object/parameter/destination")"
destination="$(cat "$__object/parameter/destination")"
else
destination='/etc/cdist-configured'
fi
# The basic output of date is usually good enough, but variety is the # The basic output of date is usually good enough, but variety is the
# spice of life... # spice of life...
if [ -f "$__object/parameter/format" ]; then format="$(cat "$__object/parameter/format")"
format="$(cat "$__object/parameter/format")"
else
format='-u'
fi
# Dump the timestamp in UTC to the marker # Dump the timestamp in UTC to the marker
echo "date $format > $destination" echo "date $format > $destination"

View file

@ -0,0 +1 @@
/etc/cdist-configured

View file

@ -0,0 +1 @@
-u