今日好唔開心…………..好唔鍾意自己咁冇用….. 處理了一件麻煩事…. 明天要加點衝勁, 為著以後的路.
因為唔同platfrom… 係linux/max 上可以行既shell script, 係windows 係可以用cygwin 去行 可惜, 如果用 eclipse > ant build , 個ant call *.sh 就出事 寫(translate)左一個好無聊既 batch script (被)玩左一個下午,就係因為唔識寫script, 同埋個help 係 %~dpnI 唔係 %%~dpnI …. 記錄一下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
::-----------------------------------------------------------:: :: CONFIGURATION SCRIPT :: :: Script copies file.type.{DEPLOY} to file.type :: Where {DEPLOY} is one of PRODUCTION|STAGING|QA|INTERNAL|DEV :: :: modify from config.sh to windows environment :: :: Author: Steve Chan steve.chan@pxxxxl.com.au :: $Id: config.bat,v 1.0 2009/01/07 13:24:57 steve Exp $ ::-----------------------------------------------------------:: :: check that we were supplied two parameters @ECHO OFF IF NOT (%1)==() SET DEST=%1 IF NOT (%2)==() SET DEPLOY=%2 ::@ECHO ON ECHO.DIR /b /s %DEST%*.%DEPLOY% :: copy all filenames with extension . to a temporary file DIR /b /s %DEST%\*.%DEPLOY% > tmp.out :: iterate through the filenames and copy to the filename root FOR /f %%I IN (tmp.out) DO ( ECHO.copy: %%I %%~dpnI COPY %%I %%~dpnI ) :: get rid of the temporary file del tmp.out |
part of maven.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<goal name="config"> <echo>CONFIGURATION BUNDLE USED: ${configuration.bundle}</echo> <echo>${configuration.script} ${basedir} ${configuration.bundle}</echo> <!-- distinguish windows environment, using config.bat instead of config.sh --> <!-- orginal script--> <!-- <ant:exec dir="${basedir}" executable="sh"> <ant:arg line="${configuration.script} ${basedir} ${configuration.bundle}"/> --> <ant:condition property="os.windows.family"> <ant:os family="windows"/> </ant> <j:choose> <j:when test="${os.windows.family}"> <ant:exec dir="${basedir}" executable="cmd"> <ant:arg line="/c config.bat ${basedir} ${configuration.bundle}" /> <echo>Windows Environment: config.bat ${basedir} ${configuration.bundle}</echo> </ant:exec> </j:when> <j:otherwise> <ant:exec dir="${basedir}" executable="sh"> <ant:arg line="${configuration.script} ${basedir} ${configuration.bundle}" /> </ant:exec> </j:otherwise> </j:choose> <!-- end modification for windows environment --> </goal> |
上班首兩天, 暫時什麼都唔清楚, 沒有什麼task assigned 主要是set up environment for development, 第一天回到office, 之前收到上司(Gary)既email, 叫我9:30 返, (太早冇人serve我) 基於人生路不熟, 又怕上班時間會塞車, 又唔知泊車個度係點 都係早點出門穩妥一點. 結果….交通非常暢順, 車位雖然不足, 所以就咁泊其他車前面 (到時就會有人黎叫你~) 8:45 就到左….Gary 仲話冇諗過我會咁早出現…. 一埋位, “your computer should be here last week”, 負責既同事又未返, 這裡 xmas 大過天, 就好似中國人過年咁, annual leave (AL)通常會夾埋xmas 放 btw, 23日AL (1st yr), 24(2nd), 25(>=3rd)….. 一年內如果冇放過假, 你既上司會了解下你同encourage 你take AL…. xmas 前好多人shopping, 買present …