comparison scripts/update_board.sh @ 427:fd948111f8ea prerelease

Compatibility: mingw's default date format is not parsed correctly by Debian; stat is not necessarily available
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 16 Jun 2016 18:09:59 +0100
parents 99de323c13b3
children b27676f871d7
comparison
equal deleted inserted replaced
426:4c2588930b0a 427:fd948111f8ea
69 shift 69 shift
70 done 70 done
71 71
72 72
73 # Find location of this script so we can locate the rest of the files 73 # Find location of this script so we can locate the rest of the files
74 SCRIPTPATH=$(readlink "$0") 74 SCRIPTDIR=$(dirname "$0")
75 SCRIPTDIR=$(dirname "$SCRIPTPATH")
76 [ -z "$IDE_FOLDER" ] && IDE_FOLDER=$SCRIPTDIR/../../bela-ide/ 75 [ -z "$IDE_FOLDER" ] && IDE_FOLDER=$SCRIPTDIR/../../bela-ide/
77 76
78 77
79 ssh $BBB_ADDRESS "date -s '`date`' > /dev/null; stat $BBB_BELA_HOME &>/dev/null" && DESTINATION_EMPTY=0 || DESTINATION_EMPTY=1 78 ssh $BBB_ADDRESS "date -s \"`date '+%Y%m%d %T'`\" > /dev/null; stat $BBB_BELA_HOME &>/dev/null" && DESTINATION_EMPTY=0 || DESTINATION_EMPTY=1
80 79
81 if [ $DESTINATION_EMPTY -eq 0 ]; 80 if [ $DESTINATION_EMPTY -eq 0 ];
82 then 81 then
83 echo "Updating the Bela core code in $BBB_ADDRESS:$BBB_BELA_HOME" 82 echo "Updating the Bela core code in $BBB_ADDRESS:$BBB_BELA_HOME"
84 if [ $RESET_BOARD -eq 1 ]; 83 if [ $RESET_BOARD -eq 1 ];
144 ssh $BBB_ADDRESS "cd $BBB_BELA_HOME; doxygen &>/dev/null" 143 ssh $BBB_ADDRESS "cd $BBB_BELA_HOME; doxygen &>/dev/null"
145 error_handler $? "\nError while generating Doxygen documentation\n" 144 error_handler $? "\nError while generating Doxygen documentation\n"
146 145
147 #------------- 146 #-------------
148 #Installing IDE 147 #Installing IDE
149 stat $IDE_FOLDER/scripts/setup_IDE.sh &> /dev/null 148 ls $IDE_FOLDER/scripts/setup_IDE.sh &> /dev/null
150 if [ $? -eq 0 ] 149 if [ $? -eq 0 ]
151 then 150 then
152 cd $IDE_FOLDER/scripts && ./setup_IDE.sh -y 151 cd $IDE_FOLDER/scripts && ./setup_IDE.sh -y
153 # run the IDE 152 # run the IDE
154 ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" 153 ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart"