w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 928f885bab169f4abda1838a985f722b44892d9b
parent 33078febf99781a78640b298768cba2932fb4bff
Author: ukai <ukai>
Date:   Sat, 15 Dec 2001 17:25:45 +0000

[w3m-dev 02664] install-sh -s option
From: Rin Okuyama <okuyama@cna.ne.jp>

Diffstat:
MChangeLog | 6++++++
MXMakefile | 2+-
Minstall-sh | 25++++++++++++++++++-------
3 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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> * [w3m-dev 02663] fix prevA() cause loop diff --git a/XMakefile b/XMakefile @@ -32,7 +32,7 @@ CFLAGS=$(OPTS) $(MYCFLAGS) $(DEFS) LIBS=-L. -lindep $(GCLIB) $(MATHLIB) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) LIBS2=-L. -lindep $(GCLIB) $(LOCAL_LIBRARIES) INSTALL=sh install-sh -INSTALL_PROGRAM=$(INSTALL) -m 755 +INSTALL_PROGRAM=$(INSTALL) -m 755 -s INSTALL_SCRIPT=$(INSTALL) -m 755 INSTALL_DATA=$(INSTALL) -m 644 AR=ar diff --git a/install-sh b/install-sh @@ -8,6 +8,14 @@ do mode=$2 shift; shift ;; + -s) + if [ -n "$STRIP" ]; then + strip=$STRIP + else + strip=strip + fi + shift; + ;; -*) shift ;; @@ -17,18 +25,21 @@ do done if [ $# -lt 2 ]; then - echo "usage: $0 [-m mode] file1 file2" + echo "usage: $0 [-m mode] [-s] file1 file2" exit 1 fi file=$1 -dest=$2 +if [ -d $2 ]; then + dest=$2/$file +else + dest=$2 +fi cp $file $dest +if [ -n "$strip" ]; then + $strip $dest +fi if [ -n "$mode" ]; then - if [ -d $dest ]; then - chmod $mode $dest/$file - else - chmod $mode $dest - fi + chmod $mode $dest fi