mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
parent
c5c2bdbf50
commit
125b68e08a
7 changed files with 207 additions and 9 deletions
11
example-script.sh
Executable file
11
example-script.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /home/robin/Projects/haze/target/debug/haze script
|
||||
#! haze shell pgsql s3
|
||||
|
||||
echo 'test' | occ file:put '-' /admin/files/test.txt
|
||||
FILE_ID=$(occ info:file /admin/files/test.txt | grep fileid: | grep -oE '[0-9]+')
|
||||
OBJECT_CONTENTS=$(occ file:object:get urn:oid:$FILE_ID -)
|
||||
if [ "$OBJECT_CONTENTS" == 'test' ]; then
|
||||
echo "object contains expected contents"
|
||||
else
|
||||
echo "object does not contains expected contents!"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue