version 1.2.4.2, 2012/05/29 14:24:05
|
version 1.6, 2013/05/07 20:46:48
|
Line 40 SnitVer()
|
Line 40 SnitVer()
|
# $3 = To Dest dir |
# $3 = To Dest dir |
InstallList() |
InstallList() |
{ |
{ |
sed -nE -e 's/^ *([^ #]+) */\1/p' < $1 | tr ':' '\n' | | local TMPFILE=$(mktemp -q /tmp/instlist.XXXXXX) |
tar -C $2 -cvf - -T - | tar -C $3 -x -f - | if [ $? -ne 0 ]; then |
| echo "Error:: Can't create temp file, exiting..." |
| exit 1 |
| fi |
| |
| sed -nE -e 's/^ *([^ #]+) */\1/p' < $1 | tr ':' '\n' >$TMPFILE |
| cd $2 |
| for i in $(cat $TMPFILE); do |
| if [ -x $i ]; then |
| echo "Strip '$i'" |
| strip -s $i |
| fi |
| done |
| cd - |
| tar -C $2 -cvf - -T $TMPFILE | tar -C $3 -x -f - |
| rm -f $TMPFILE |
} |
} |
|
|
# $1 = From dir |
# $1 = From dir |
Line 79 CleanCVS()
|
Line 94 CleanCVS()
|
find $1 -type f -name .#\* -exec rm -f {} \; >/dev/null 2>&1 |
find $1 -type f -name .#\* -exec rm -f {} \; >/dev/null 2>&1 |
} |
} |
|
|
|
# $1 = file_pattern |
|
# $2 = From dir |
|
StripFiles() |
|
{ |
|
if [ -d "$2" ]; then |
|
local TMPFILE=$(mktemp -q /tmp/instlist.XXXXXX) |
|
if [ $? -ne 0 ]; then |
|
echo "Error:: Can't create temp file, exiting..." |
|
exit 1 |
|
fi |
|
|
|
cd $2 |
|
find . -type f -name "$1" >$TMPFILE |
|
for i in $(cat $TMPFILE); do |
|
if [ -x $i ]; then |
|
echo "Strip '$i'" |
|
strip -s $i |
|
fi |
|
done |
|
cd - |
|
rm -f $TMPFILE |
|
fi |
|
} |