about summary refs log tree commit diff stats
path: root/post.sh
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-07-16 17:57:53 -0400
committerCharadon <dev@iotib.net>2022-07-16 17:57:53 -0400
commit0143ed2ff68a130e8e895f0d491ab271c2afdf5d (patch)
tree907090cece8e99fc2adc66257832fe4ab7d6206f /post.sh
parentc9a15281b7328742a59c46eb3171754ce9e30bff (diff)
downloaddscip-0143ed2ff68a130e8e895f0d491ab271c2afdf5d.tar.gz
Added chroot feature, allowed all variables used in dscip to be used in the build scripts (such as CURRENT_COMMIT) and added some examples to the build scripts.
Diffstat (limited to 'post.sh')
-rwxr-xr-xpost.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/post.sh b/post.sh
index 1d048f9..ccd097b 100755
--- a/post.sh
+++ b/post.sh
@@ -1,5 +1,19 @@
 #!/bin/sh
+set -e
 
-# Execute commands after building. Like pushing to an FTP server. #
+# Execute commands after building. Like pushing to an FTP server.              #
+# Below is an example of what commands you could use.                          #
+
+bsdtar -a -cvf program-$CURRENT_COMMIT.tar.gz app/
+ftp -in <<EOF
+open 192.168.1.1
+user example password
+mkdir $CURRENT_COMMIT
+cd $CURRENT_COMMIT
+put program-$CURRENT_COMMIT.tar.gz program-$CURRENT_COMMIT.tar.gz
+put $WORKING_DIRECTORY/output.log output.log
+close
+bye
+EOF
 
 exit 0