updated to support 6 digits instead of 4.
[feisty_meow.git] / scripts / buildor / synch_to_build.sh
1 #!/bin/bash
2
3 if [ $# -lt 1 ]; then
4   echo "The first parameter must be the directory to synch into."
5   exit 1
6 fi
7 instdir="$1"
8
9 chmod -R u+w "$instdir"
10
11 exval=0
12
13 for curr_file in "$instdir"/*.dll; do 
14   base=$(basename "$curr_file")
15   if [ -f "$FEISTY_MEOW_DIR/dll/$base" ]; then
16     cp -f "$FEISTY_MEOW_DIR/dll/$base" "$curr_file"
17     if [ $? -ne 0 ]; then
18       echo "** Error copying $base to $instdir"
19       exval=1
20     fi
21   fi
22 done
23 for curr_file in "$instdir"/*.exe; do 
24   base=$(basename "$curr_file")
25   if [ -f "$FEISTY_MEOW_DIR/exe/$base" ]; then
26     cp -f "$FEISTY_MEOW_DIR/exe/$base" "$curr_file"
27     if [ $? -ne 0 ]; then
28       echo "** Error copying $base to $instdir"
29       exval=1
30     fi
31   fi
32 done
33
34 exit $exval
35