소스 검색

Added deploy script and enabled build counter

Philipp Hinz 8 년 전
부모
커밋
83d1793a91
2개의 변경된 파일18개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      CoffeeCode/buildno
  2. 17 0
      CoffeeCode/deploy

+ 1 - 1
CoffeeCode/buildno

@@ -1 +1 @@
-0
+14

+ 17 - 0
CoffeeCode/deploy

@@ -0,0 +1,17 @@
+#!/bin/bash
+echo "Deploying source and executable from $2 ..."
+#echo "Deploying source of $1"
+#rsync -av --delete "$2/" "/mnt/flippi/Pi code/"
+echo "Deploying executable $1"
+rsync -av --delete "$2/Debug/$1" "/mnt/coffeepi/Debug/"
+#echo "Deploying on Janztecpi.."
+#rsync -av --delete "$2/Debug/$1" "/mnt/janztecpi/Pi code/Debug/"
+COUNT=$(cat "$2/buildno")
+
+if [ "$1" == "coffeecode" ]; then
+echo "Increasing build No.."
+echo $(($COUNT+1)) > "$2/buildno"
+echo "Current build number is $(($COUNT+1))"
+else
+echo "Current build number is $COUNT"
+fi