This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TAB=$'\t' | |
| #get svn revision from manually input | |
| SVN_DIFF_REV=$1 | |
| git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" -e "/^---/s/$/${TAB}(revision ${SVN_DIFF_REV})/" | awk '{if($1!="+++") print ; else print $1" "$2"\t(working copy)"}' | sed -e "/\/dev\/null/s/[0-9]*)$/0)/" > changes.patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| int is_leap_year(int year){ | |
| if((year - 2000)%400==0) | |
| return 1; | |
| else if((year - 2000)%100 == 0) | |
| return 0; | |
| else if((year - 2000)%4 == 0) | |
| return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #get svn revision | |
| revision=`svn info -rHEAD | grep "Last Changed Rev" | awk '{print $4}'` | |
| echo newest SVN revision is $revision | |
| #rename | |
| input=$1 | |
| filename=${input%.*} | |
| extension=${input##*.} | |
| #echo $filename | |
| #echo $extension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $make MODEL=[$model] --just-print | grep -m 1 "\-D" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @brief This function is the main function of this script set. For those who cannot read script, I think this name is better than main. | |
| **/ | |
| function choose_Me_to_Backup(){ | |
| readTable(); | |
| } | |
| /** | |
| * @brief This function can read a sheet table in the file | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void print_time(int file_print,FILE* fp,int print_hour){ | |
| time_t timeNow = time(NULL)%(24*60*60); | |
| if(file_print == 1){ | |
| if(print_hour == 1) | |
| fprintf(fp,"%d:",timeNow/3600+8);//hour | |
| fprintf(fp,"%d:",(timeNow%3600)/60);//minute | |
| fprintf(fp,"%d\n",timeNow%60);//second | |
| }else{ | |
| if(print_hour == 1) |