2012-04-22 15:12:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-05-03 11:34:46 +00:00
|
|
|
ARCH_EXT="$1"
|
2012-04-22 15:12:15 +00:00
|
|
|
|
2013-05-08 12:44:57 +00:00
|
|
|
SCRIPT=$(readlink -f "$0")
|
|
|
|
BASE_DIR=$(dirname "$SCRIPT")
|
|
|
|
RARCH_DIR="$BASE_DIR/dist"
|
2013-05-19 10:09:15 +00:00
|
|
|
RARCH_DIST_DIR="$RARCH_DIR/win"
|
|
|
|
|
|
|
|
DAY=$(date +"%Y%m%d")
|
2012-04-22 15:12:15 +00:00
|
|
|
|
2013-05-03 11:34:46 +00:00
|
|
|
cd "$RARCH_DIST_DIR"
|
|
|
|
for file in *.dll
|
2012-04-22 15:12:15 +00:00
|
|
|
do
|
2013-05-19 10:09:15 +00:00
|
|
|
REGEX_MV="s|^\(.*\)\.dll$|\1_${ARCH_EXT}_${DAY}.dll|"
|
|
|
|
REGEX="s|^\(.*\)\.dll$|\1_${ARCH_EXT}_${DAY}.zip|"
|
2012-04-22 15:12:15 +00:00
|
|
|
FILENAME="`echo $file | sed -e $REGEX_MV`"
|
|
|
|
mv -v "$file" "$FILENAME"
|
|
|
|
zip "`echo $file | sed -e $REGEX`" "$FILENAME"
|
2013-05-08 12:44:57 +00:00
|
|
|
rm -f "$FILENAME"
|
2012-04-22 15:12:15 +00:00
|
|
|
done
|
|
|
|
|