Permalink
Browse files

Resource scripts: Allow commit ref to be passed as argument, default is

HEAD
  • Loading branch information...
1 parent 31afd10 commit a270f93288a163b726cad2ecedcf63d0384d81e3 @Armada651 Armada651 committed Jul 29, 2012
Showing with 12 additions and 6 deletions.
  1. +6 −3 src/mpc-hc/mpcresources/rcfile.bat
  2. +6 −3 src/mpc-hc/mpcresources/sync.bat
View
9 src/mpc-hc/mpcresources/rcfile.bat
@@ -1,14 +1,17 @@
@ECHO OFF
SETLOCAL
-rem This is a simple script to check out the head revision of mplayerc.rc,
+rem This is a simple script to check out a revision of mplayerc.rc,
rem then rename it to old file for rcfile.pl to process it
CALL "common.bat"
IF %ERRORLEVEL% NEQ 0 GOTO END
-ECHO Getting the latest mplayerc.rc from repository...
-git.exe show origin/HEAD:../mplayerc.rc > $$TEMP$$.old
+SET REF=HEAD
+IF NOT "%1"=="" SET REF=%1
+
+ECHO Get mplayerc.rc from %REF% first...
+git.exe show %REF%:../mplayerc.rc > $$TEMP$$.old
ECHO Generating new rc files and string files...
perl.exe rcfile.pl -b $$TEMP$$.old
View
9 src/mpc-hc/mpcresources/sync.bat
@@ -1,16 +1,19 @@
@ECHO OFF
SETLOCAL
-rem An all in one script which demonstrates how to sync all locale rc files to the latest mplayerc.rc.
+rem An all in one script which demonstrates how to sync all locale rc files to a revision of mplayerc.rc.
rem It will try to patch existing local rc files first, then sync them to mplayerc.rc.
rem Then it will overwrite rc files with new rc ones, and after that it will generate the text files.
rem This is only an example.
CALL "common.bat"
IF %ERRORLEVEL% NEQ 0 GOTO END
-ECHO Get the latest mplayerc.rc from repository first...
-git.exe show origin/HEAD:../mplayerc.rc > $$TEMP$$.old
+SET REF=HEAD
+IF NOT "%1"=="" SET REF=%1
+
+ECHO Get mplayerc.rc from %REF% first...
+git.exe show %REF%:../mplayerc.rc > $$TEMP$$.old
ECHO ----------------------
FOR %%i IN (*.rc) DO (

0 comments on commit a270f93

Please sign in to comment.