revert __line for clean PR history

This commit is contained in:
stephan 2022-07-28 17:53:41 +02:00
parent 7d8fc8a5c3
commit 17466452f0
5 changed files with 2 additions and 20 deletions

View File

@ -34,16 +34,8 @@ state_should="$(cat "$__object/parameter/state")"
state_is="$(cat "$__object/explorer/state")" state_is="$(cat "$__object/explorer/state")"
if [ -z "$state_is" ]; then if [ -z "$state_is" ]; then
if [ -f "$__object/parameter/create" ]; then printf 'The file "%s" is missing. Please create it before using %s on it.\n' "$file" "${__type##*/}" >&2
echo "touch $file" exit 1
else
# only bark if the file should exists
if [ -f "$__object/parameter/ifexists" ]; then
exit 0
fi
printf 'The file "%s" is missing. Please create it before using %s on it.\n' "$file" "${__type##*/}" >&2
exit 1
fi
fi fi
if [ "$state_should" = "$state_is" ] || \ if [ "$state_should" = "$state_is" ] || \

View File

@ -21,9 +21,6 @@ OPTIONAL PARAMETERS
after after
Insert the given line after this pattern. Insert the given line after this pattern.
create
It the file does not exist then create an empty file
before before
Insert the given line before this pattern. Insert the given line before this pattern.
@ -31,9 +28,6 @@ file
If supplied, use this as the destination file. If supplied, use this as the destination file.
Otherwise the object_id is used. Otherwise the object_id is used.
ifexists
Only apply the line if the file exists.
line line
Specifies the line which should be absent or present. Specifies the line which should be absent or present.

View File

@ -1,2 +0,0 @@
create
ifexists

View File

@ -1 +0,0 @@
false

View File

@ -1 +0,0 @@
false