[w3m-dev 02664] install-sh -s option

From: Rin Okuyama <okuyama@cna.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2001-12-15 17:25:45 +00:00
parent 5e2020bd47
commit 7d210d5c99
3 changed files with 29 additions and 12 deletions

View File

@@ -1,3 +1,9 @@
2001-12-16 Rin Okuyama <okuyama@cna.ne.jp>
* [w3m-dev 02664] install-sh -s option
* XMakefile: install-sh -s
* install-sh: support strip option
2001-12-15 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> 2001-12-15 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02663] fix prevA() cause loop * [w3m-dev 02663] fix prevA() cause loop
@@ -1250,4 +1256,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.129 2001/12/14 17:58:40 ukai Exp $ $Id: ChangeLog,v 1.130 2001/12/15 17:25:45 ukai Exp $

View File

@@ -1,4 +1,4 @@
# $Id: XMakefile,v 1.17 2001/12/14 17:10:54 ukai Exp $ # $Id: XMakefile,v 1.18 2001/12/15 17:25:45 ukai Exp $
SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \ SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
form.c map.c frame.c rc.c menu.c mailcap.c\ form.c map.c frame.c rc.c menu.c mailcap.c\
func.c cookie.c history.c backend.c $(KEYBIND_SRC) func.c cookie.c history.c backend.c $(KEYBIND_SRC)
@@ -32,7 +32,7 @@ CFLAGS=$(OPTS) $(MYCFLAGS) $(DEFS)
LIBS=-L. -lindep $(GCLIB) $(MATHLIB) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) LIBS=-L. -lindep $(GCLIB) $(MATHLIB) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES)
LIBS2=-L. -lindep $(GCLIB) $(LOCAL_LIBRARIES) LIBS2=-L. -lindep $(GCLIB) $(LOCAL_LIBRARIES)
INSTALL=sh install-sh INSTALL=sh install-sh
INSTALL_PROGRAM=$(INSTALL) -m 755 INSTALL_PROGRAM=$(INSTALL) -m 755 -s
INSTALL_SCRIPT=$(INSTALL) -m 755 INSTALL_SCRIPT=$(INSTALL) -m 755
INSTALL_DATA=$(INSTALL) -m 644 INSTALL_DATA=$(INSTALL) -m 644
AR=ar AR=ar

View File

@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# $Id: install-sh,v 1.1 2001/12/06 15:36:55 ukai Exp $ # $Id: install-sh,v 1.2 2001/12/15 17:25:45 ukai Exp $
while : while :
do do
@@ -8,6 +8,14 @@ do
mode=$2 mode=$2
shift; shift shift; shift
;; ;;
-s)
if [ -n "$STRIP" ]; then
strip=$STRIP
else
strip=strip
fi
shift;
;;
-*) -*)
shift shift
;; ;;
@@ -17,18 +25,21 @@ do
done done
if [ $# -lt 2 ]; then if [ $# -lt 2 ]; then
echo "usage: $0 [-m mode] file1 file2" echo "usage: $0 [-m mode] [-s] file1 file2"
exit 1 exit 1
fi fi
file=$1 file=$1
dest=$2 if [ -d $2 ]; then
dest=$2/$file
else
dest=$2
fi
cp $file $dest cp $file $dest
if [ -n "$mode" ]; then if [ -n "$strip" ]; then
if [ -d $dest ]; then $strip $dest
chmod $mode $dest/$file fi
else if [ -n "$mode" ]; then
chmod $mode $dest chmod $mode $dest
fi
fi fi