summaryrefslogtreecommitdiff
path: root/yarns/implementations.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r--yarns/implementations.yarn19
1 files changed, 19 insertions, 0 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 66d47bfd..b5b6a253 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -657,6 +657,14 @@ them, so they can be added to the end of the implements section.
if [ $MATCH_1 == "deploys" ]; then run_morph "$@"
else attempt_morph "$@"; fi
+ IMPLEMENTS WHEN the user (attempts to deploy|deploys) (.*) from cluster (\S+) in branch (\S+)
+ cd "$DATADIR/workspace/$MATCH_4"
+ set -- deploy "$MATCH_3"
+ systems=$(echo "$MATCH_2" | sed -e 's/, /\n/g' -e 's/ and /\n/g')
+ set -- "$@" $systems
+ if [ $MATCH_1 == "deploys" ]; then run_morph "$@"
+ else attempt_morph "$@"; fi
+
IMPLEMENTS WHEN the user (attempts to upgrade|upgrades) the (system|cluster) (\S+) in branch (\S+)( with options (.*))?
cd "$DATADIR/workspace/$MATCH_4"
set -- deploy --upgrade "$MATCH_3"
@@ -694,6 +702,14 @@ The file contents is used as a `printf`(1) format string.
IMPLEMENTS GIVEN a file called (\S+) containing "(.*)"
printf "$MATCH_2" > "$DATADIR/$MATCH_1"
+Remove a file
+-------------
+
+ IMPLEMENTS GIVEN the file(s)? (.*) (is|are) removed
+ cd "$DATADIR"
+ files=$(echo "$MATCH_2" | sed -e 's/, /\n/g' -e 's/ and /\n/g')
+ rm $files
+
Set attributes on a file or directory
-------------------------------------
@@ -712,6 +728,9 @@ Check attributes of a file on the filesystem
IMPLEMENTS THEN file (\S+) exists
test -e "$DATADIR/$MATCH_1"
+ IMPLEMENTS THEN file (\S+) does not exist
+ test ! -e "$DATADIR/$MATCH_1"
+
IMPLEMENTS THEN file (\S+) has permissions (\S+)
stat -c %A "$DATADIR/$MATCH_1" | grep -Fx -e "$MATCH_2"