Tue Jan 7 13:32:38 2014 UTC ()
PR/46182: Andreas Gustafsson: Make all files ending in [.-]sh executable.
The perfect is the enemy of the good.


(christos)
diff -r1.38 -r1.39 src/distrib/sets/makesrctars

cvs diff -r1.38 -r1.39 src/distrib/sets/makesrctars (expand / switch to unified diff)

--- src/distrib/sets/makesrctars 2009/11/30 16:13:23 1.38
+++ src/distrib/sets/makesrctars 2014/01/07 13:32:38 1.39
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2# 2#
3# $NetBSD: makesrctars,v 1.38 2009/11/30 16:13:23 uebayasi Exp $ 3# $NetBSD: makesrctars,v 1.39 2014/01/07 13:32:38 christos Exp $
4# 4#
5# makesrctars srcdir setdir 5# makesrctars srcdir setdir
6# Create source tarballs in setdir from the source under srcdir. 6# Create source tarballs in setdir from the source under srcdir.
7# 7#
8 8
9prog="${0##*/}" 9prog="${0##*/}"
10rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/" 10rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
11. "${rundir}/sets.subr" 11. "${rundir}/sets.subr"
12 12
13# set defaults 13# set defaults
14xsrcdir= 14xsrcdir=
15quiet=false 15quiet=false
16 16
@@ -87,27 +87,27 @@ makeset() @@ -87,27 +87,27 @@ makeset()
87 # Gets rid of any obj dirs and things below it  87 # Gets rid of any obj dirs and things below it
88 echo "obj" > "${intmp}" 88 echo "obj" > "${intmp}"
89 egrep="$*" 89 egrep="$*"
90 if [ "${egrep}" = "" ]; then 90 if [ "${egrep}" = "" ]; then
91 egrep='.' 91 egrep='.'
92 fi 92 fi
93 set -f 93 set -f
94 ${MTREE} -c -X "${intmp}" | ${MTREE} -CS -k type | \ 94 ${MTREE} -c -X "${intmp}" | ${MTREE} -CS -k type | \
95 ${EGREP} -v 'type=link' | ${EGREP} ${egrep} | \ 95 ${EGREP} -v 'type=link' | ${EGREP} ${egrep} | \
96 ${SED} -e 's:type=file:& mode=0664:' \ 96 ${SED} -e 's:type=file:& mode=0664:' \
97 -e 's:type=dir:& mode=0775:' \ 97 -e 's:type=dir:& mode=0775:' \
98 -e 's:$: uname=root gname=wsrc:' \ 98 -e 's:$: uname=root gname=wsrc:' \
99 -e '/\/move-if-change /s:\(mode\)=[0-9]*:\1=0775:' \ 99 -e '/\/move-if-change /s:\(mode\)=[0-9]*:\1=0775:' \
100 -e '/^\.\/build.sh /s:\(mode\)=[0-9]*:\1=0775:' | \ 100 -e '/^\.\/.*[.-]sh /s:\(mode\)=[0-9]*:\1=0775:' | \
101 ${PAX} -M -N "${PASSWD}" -w -d -s'|^\.|'"${srcprefix}"'|' | \ 101 ${PAX} -M -N "${PASSWD}" -w -d -s'|^\.|'"${srcprefix}"'|' | \
102 ${GZIP_CMD} > "${setdir}/${set}" 102 ${GZIP_CMD} > "${setdir}/${set}"
103 rm -f "${intmp}" 103 rm -f "${intmp}"
104)} 104)}
105 105
106 106
107# create (base)src sets 107# create (base)src sets
108# 108#
109 109
110if ! cd "${srcdir}"; then 110if ! cd "${srcdir}"; then
111 echo >&2 "${prog}: can't chdir to ${srcdir}" 111 echo >&2 "${prog}: can't chdir to ${srcdir}"
112 exit 1 112 exit 1
113fi 113fi