version 1.1.1.1, 2011/07/05 23:43:00
|
version 1.4.2.1, 2013/01/28 10:48:46
|
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 |
# $2 = To dir |
# $2 = To dir |
InstallFiles() | InstallDir() |
{ |
{ |
cd $1 |
cd $1 |
pax -rw -pe -X . $2 |
pax -rw -pe -X . $2 |
Line 57 InstallFiles()
|
Line 72 InstallFiles()
|
InstallProg() |
InstallProg() |
{ |
{ |
install -c $* |
install -c $* |
|
} |
|
|
|
# $1 = file_pattern |
|
# $2 = From dir |
|
# $3 = To dir |
|
InstallFiles() |
|
{ |
|
if [ -d "$2" ]; then |
|
cd $2 |
|
find . -type f -name "$1" | |
|
tar -cvf - -T - | tar -C $3 -xf - |
|
cd - |
|
fi |
|
} |
|
|
|
# $1 = Directory for clean |
|
CleanCVS() |
|
{ |
|
find $1 -type d -name CVS -exec rm -rf {} \; >/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 |
} |
} |