Browse Source

Darix:

fixed tail -n, head -n, expand -t and chown usr:grp usage
reviewed and hand-fixed patch by clifford


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2493 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
6bb6628828
37 changed files with 62 additions and 62 deletions
  1. +1
    -1
      misc/archive/extconv.sh
  2. +1
    -1
      misc/archive/getdefs.sh
  3. +3
    -3
      misc/archive/mklibs.sh
  4. +1
    -1
      misc/archive/treenice.sh
  5. +1
    -1
      package/base/howtos/howtos.conf
  6. +1
    -1
      package/base/linux24-src/linux24-src.conf
  7. +1
    -1
      package/base/linux24/kernelversion.sh
  8. +1
    -1
      package/base/linux24/lx_config.sh
  9. +1
    -1
      package/base/lynx/lynx.conf
  10. +1
    -1
      package/base/man/parse-config
  11. +1
    -1
      package/base/ppp/rocknet_ppp.sh
  12. +1
    -1
      package/base/rfc/rfc.conf
  13. +3
    -3
      package/base/sysfiles/stone_mod_general.sh
  14. +1
    -1
      package/base/sysfiles/stone_mod_install.sh
  15. +1
    -1
      package/base/sysfiles/stone_mod_packages.sh
  16. +2
    -2
      package/base/sysfiles/stone_mod_runlevel.sh
  17. +1
    -1
      package/base/sysfiles/stone_mod_setup.sh
  18. +1
    -1
      package/base/sysfiles/sysfiles.conf
  19. +1
    -1
      package/base/sysfiles/system.init
  20. +1
    -1
      package/base/sysklogd/logrotate.cron
  21. +1
    -1
      package/jimmy/motor/motor.conf
  22. +4
    -4
      package/jimmy/mplayer-fonts/mplayer-fonts.conf
  23. +1
    -1
      package/jimmy/mplayer/mplayer.conf
  24. +3
    -3
      package/powerpc/yaboot/stone_mod_yaboot.sh
  25. +2
    -2
      package/x86/grub/stone_mod_grub.sh
  26. +1
    -1
      package/x86/lilo/stone_mod_lilo.sh
  27. +5
    -5
      scripts/Build-Pkg
  28. +1
    -1
      scripts/Build-Target
  29. +2
    -2
      scripts/Build-Tools
  30. +4
    -4
      scripts/Check-PkgVersion
  31. +3
    -3
      scripts/Config
  32. +1
    -1
      scripts/Create-CopyPatch
  33. +1
    -1
      scripts/Create-ErrList
  34. +3
    -3
      scripts/Create-ParaSim
  35. +1
    -1
      scripts/Download
  36. +1
    -1
      scripts/create-cache.sh
  37. +3
    -3
      scripts/functions

+ 1
- 1
misc/archive/extconv.sh

@ -33,7 +33,7 @@ fi
egrep '^# +\[' $1.ext | sed 's,^# *,,' | \
egrep -v '^\[(P|PRI|PRIORITY)\]' > $1.desc
pri=`{ egrep '^# +\[(P|PRI|PRIORITY)\] +' $1.ext ; echo ". . 5" ; } | head -1 | tr -s ' ' | cut -f3 -d' '`
pri=`{ egrep '^# +\[(P|PRI|PRIORITY)\] +' $1.ext ; echo ". . 5" ; } | head -n 1 | tr -s ' ' | cut -f3 -d' '`
echo "[P] X ------6--9 300.$pri" >> $1.desc
{

+ 1
- 1
misc/archive/getdefs.sh

@ -33,6 +33,6 @@ done
echo "== ${1:-cc} -E =="
${1:-cc} -E /tmp/$$.c | egrep -xv '(X(.*) \2|#.*)' | \
cut -c2- | sed 's, , ,' | expand -20
cut -c2- | sed 's, , ,' | expand -t20
rm -f /tmp/$$.c

+ 3
- 3
misc/archive/mklibs.sh

@ -187,7 +187,7 @@ find-cycle () {
if [ "x`cat $fl_dir/find-cycle`" = x ] ; then
return 1
else
if [ "x`head -1 $fl_dir/find-cycle`" != "xtsort: cycle in data" ] ; then
if [ "x`head -n 1 $fl_dir/find-cycle`" != "xtsort: cycle in data" ] ; then
echo 1>&2 $0: find-cycle: internal error: tsort has invalid output format
exit 1
fi
@ -325,7 +325,7 @@ get-top-of-queue () {
exit 1
fi
is-queue "$1"
local head=`head -1 "$1"`
local head=`head -n 1 "$1"`
if [ "x$head" = "x$QUEUE_SEPERATOR" ] ; then
return 1
else
@ -831,7 +831,7 @@ do
add-arrow $fl_dir/dependency-graph "$cur_lib" "$lib"
else
get-library-depends "$lib" > $fl_dir/backup
if [ "x`head -1 $fl_dir/backup`" = x ] ; then
if [ "x`head -n 1 $fl_dir/backup`" = x ] ; then
$verbose -n 2>&1 N
add-node $fl_dir/dependency-graph "$cur_lib"
else

+ 1
- 1
misc/archive/treenice.sh

@ -37,7 +37,7 @@ if [ $# = 0 ] ; then
exit 1
else
for x ; do
for y in $( ps -e -o pid,comm | tail +2 |
for y in $( ps -e -o pid,comm | tail -n +2 |
awk "\$1 == \"$x\" || \$2 == \"$x\" { print \$1; }" )
do
main $y ""

+ 1
- 1
package/base/howtos/howtos.conf

@ -27,7 +27,7 @@ howtos_main() {
tar $taropt $archdir/Linux-HOWTOs.tar.bz2 -C HOWTOs
tar $taropt $archdir/Linux-mini-HOWTOs.tar.bz2 -C mini-HOWTOs
rm -rf HOWTOs/beta mini-HOWTOs/beta
chown -R root.root HOWTOs mini-HOWTOs
chown -R root:root HOWTOs mini-HOWTOs
}
autoextract=0

+ 1
- 1
package/base/linux24-src/linux24-src.conf

@ -32,7 +32,7 @@ main_lx_src() {
# hack to extract the files into our usr/src dir ...
ln -sf $PWD/linux-$ver-rock $builddir/linux-${vanilla_ver}
tar -k $taropt $archdir/$srctar -C $builddir/
chown -R 0.0 linux-$ver-rock ; chmod go=u,go-w linux-$ver-rock
chown -R 0:0 linux-$ver-rock ; chmod go=u,go-w linux-$ver-rock
if [ "${pkg%-src}" = "$ROCKCFG_DEFAULT_KERNEL" ] ; then
rm -f linux

+ 1
- 1
package/base/linux24/kernelversion.sh

@ -8,7 +8,7 @@
# echo $(( ${y//)/(}$x )) $x
# done | sort -n | while read y x ; do
# echo ${x//)\\*1000+/.}
# done | tail -1
# done | tail -n 1
# }
getkernelversion() {

+ 1
- 1
package/base/linux24/lx_config.sh

@ -160,7 +160,7 @@ lx_config ()
mv Makefile.new Makefile
echo "Correcting user and permissions ..."
chown -R root.root . * ; chmod -R u=rwX,go=rX .
chown -R root:root . * ; chmod -R u=rwX,go=rX .
if [[ $treever = 24* ]] ; then
echo "Create symlinks and a few headers for <$lx_cpu> ... "

+ 1
- 1
package/base/lynx/lynx.conf

@ -22,5 +22,5 @@
COPY=/bin/cp ; MV=/bin/mv ; export COPY MV
postmake="eval $MAKE install-help install-doc ; \
chown -R root. $root/usr/lib/lynx_{doc,help}"
chown -R root: $root/usr/lib/lynx_{doc,help}"
var_append extraconfopt ' ' '--with-ssl'

+ 1
- 1
package/base/man/parse-config

@ -33,7 +33,7 @@ postflist_man() {
while read fn ; do
[ -f $root/$fn ] || continue
chmod 0644 $fn
chown root.root $fn
chown root:root $fn
done
}

+ 1
- 1
package/base/ppp/rocknet_ppp.sh

@ -103,7 +103,7 @@ public_pppoe() {
# fire
addcode up 5 1 "ip link set $ppp_if down up"
addcode up 5 2 "/usr/sbin/pppd plugin rp-pppoe.so $ppp_if unit $ppp_unit $ppp_args"
addcode down 5 2 "[ -f /var/run/$if.pid ] && kill -TERM \`head -1 /var/run/$if.pid\`"
addcode down 5 2 "[ -f /var/run/$if.pid ] && kill -TERM \`head -n 1 /var/run/$if.pid\`"
addcode down 5 1 "[ -f /var/run/$if.pid ] && rm -f /var/run/$if.pid"
}

+ 1
- 1
package/base/rfc/rfc.conf

@ -30,7 +30,7 @@ rfc_main() {
$archdir/RFCs$x.tar.bz2
done
rm -rf nfs/ tar/ readme-rfc-all-tar.txt
ver=`ls rfc[0-9]*.txt | cut -f1 -d. | cut -c4- | sort -n | tail -1`
ver=`ls rfc[0-9]*.txt | cut -f1 -d. | cut -c4- | sort -n | tail -n 1`
}
autoextract=0

+ 3
- 3
package/base/sysfiles/stone_mod_general.sh

@ -46,7 +46,7 @@ set_keymap() {
cmd="$cmd following keyboard mappings. (Current: $keymap)'"
cmd="$cmd 'none (kernel defaults)' 'rm -f /etc/default.keymap ; loadkeys defkeymap'"
cmd="$cmd $( find $mapdir -type f ! -path '*/include/*' -name '*.map.gz' -printf '%P\n' | sed 's,\(.*\)/\(.*\).map.gz$,"\2 (\1)" "ln -sf '$mapdir'/& /etc/default.keymap ; loadkeys \2",' | expand -30 | sort | tr '\n' ' ')"
cmd="$cmd $( find $mapdir -type f ! -path '*/include/*' -name '*.map.gz' -printf '%P\n' | sed 's,\(.*\)/\(.*\).map.gz$,"\2 (\1)" "ln -sf '$mapdir'/& /etc/default.keymap ; loadkeys \2",' | expand -t30 | sort | tr '\n' ' ')"
eval "$cmd"
}
@ -61,7 +61,7 @@ set_vcfont() {
cmd="$cmd following console fonts. (Current: $vcfont)'"
cmd="$cmd 'none (kernel defaults)' 'rm -f /etc/default.vcfont ; setfont'"
cmd="$cmd $( find $fontdir -type f \( -name '*.fnt.gz' -or -name '*.psf*.gz' \) -printf '%P\n' | sed 's,\(.*\).\(fnt\|psf.*\)\.gz$,"\1" "ln -sf '$fontdir'/& /etc/default.vcfont ; setfont \1",' | expand -30 | sort | tr '\n' ' ')"
cmd="$cmd $( find $fontdir -type f \( -name '*.fnt.gz' -or -name '*.psf*.gz' \) -printf '%P\n' | sed 's,\(.*\).\(fnt\|psf.*\)\.gz$,"\1" "ln -sf '$fontdir'/& /etc/default.vcfont ; setfont \1",' | expand -t30 | sort | tr '\n' ' ')"
eval "$cmd"
}
@ -172,7 +172,7 @@ set_locale() {
unset LANG ; [ -f /etc/profile.d/locale ] && . /etc/profile.d/locale
locale="${LANG:-none}" ; cmd="gui_menu 'general_locale' 'Select one of the following locales. (Current: $locale)' 'none' 'set_locale_sub none'"
x="$( echo -e "POSIX\tC" | expand -52 )"
x="$( echo -e "POSIX\tC" | expand -t52 )"
cmd="$cmd '$x' 'set_locale_sub C' $(
grep -H ^title /usr/share/i18n/locales/* 2> /dev/null | \
awk -F '"' '{ sub(".*/", "", $1); sub("[\\.:].*", "", $1); '"

+ 1
- 1
package/base/sysfiles/stone_mod_install.sh

@ -98,7 +98,7 @@ part_add() {
disktype /dev/$1/$2 > /tmp/stone-install
type="`grep /tmp/stone-install -v -e '^ ' -e '^Block device' \
-e '^Partition' -e '^---' | \
sed -e 's/[,(].*//' -e '/^$/d' -e 's/ $//' | tail -1`"
sed -e 's/[,(].*//' -e '/^$/d' -e 's/ $//' | tail -n 1`"
size="`grep 'Block device, size' /tmp/stone-install | \
sed 's/.* size \(.*\) (.*/\1/'`"

+ 1
- 1
package/base/sysfiles/stone_mod_packages.sh

@ -69,7 +69,7 @@ startgas() {
[ -z "$( cd $dir; ls )" ] && mount $opt -v -o ro $dev $dir
if [ "$ROCKCFG_SHORTID" = "Automatically choose first" ]; then
ROCKCFG_SHORTID="$( cd $dir; ls -d */pkgs | \
cut -f1 -d/ | head -1 )"
cut -f1 -d/ | head -n 1 )"
echo "Using Config-ID <${ROCKCFG_SHORTID:-None}> .."
fi
if [ $startgas = 1 ] ; then

+ 2
- 2
package/base/sysfiles/stone_mod_runlevel.sh

@ -70,7 +70,7 @@ edit_srv() {
while
cmd="gui_menu $id 'Runlevel Editor - $srv'"
pri=`ls /etc/rc.d/rc?.d/[SX]??$srv 2> /dev/null | \
cut -c18-19 | head -1`
cut -c18-19 | head -n 1`
[ -z "$pri" ] && pri=99
for rl in 1 2 3 4 5 ; do
@ -108,7 +108,7 @@ main() {
[ -f /etc/rc.d/init.d/$srv ] || continue
pri=`ls /etc/rc.d/rc?.d/[SX]??$srv \
2> /dev/null | cut -c18-19 | head -1`
2> /dev/null | cut -c18-19 | head -n 1`
[ -z "$pri" ] && pri=99
rlv=''

+ 1
- 1
package/base/sysfiles/stone_mod_setup.sh

@ -55,7 +55,7 @@ EOT
sed 's,$, swap swap defaults 0 0,' >> $tmp2
cut -f2 -d' ' < $tmp2 | sort -u | while read dn ; do
grep " $dn " $tmp2 | tail -1; done > $tmp1
grep " $dn " $tmp2 | tail -n 1; done > $tmp1
cat << 'EOT' > $tmp2
ARGIND == 1 {

+ 1
- 1
package/base/sysfiles/sysfiles.conf

@ -53,7 +53,7 @@ main_sf() {
#!/bin/sh
${EDITOR:-vi} /etc/conf/NOTE
chmod 600 /etc/conf/NOTE
chown 0.0 /etc/conf/NOTE
chown 0:0 /etc/conf/NOTE
EOT
chmod +x usr/sbin/sysnote

+ 1
- 1
package/base/sysfiles/system.init

@ -106,7 +106,7 @@ dnl
block_split(`Refresh utmp, delete lock and tmp files and other stuff.')
find /var/lock /var/run /tmp -mindepth 1 2> /dev/null | xargs rm -rf
rm -f /etc/nologin /nologin /fastboot ; touch /var/run/utmp
chmod 664 /var/run/utmp ; chown root.tty /var/run/utmp
chmod 664 /var/run/utmp ; chown root:tty /var/run/utmp
dnl
block_split(`Writing /var/log/boot.msg.')
klogd -f /var/log/boot.msg -o ; dmesg -n 3

+ 1
- 1
package/base/sysklogd/logrotate.cron

@ -34,7 +34,7 @@ for filename in `find /var/log -type f ! -name '*.gz'` ; do
else
echo -e "$kilobytes\t$filename\t(don't rotate, less than 4 MB)"
fi
done 2>&1 | expand -6,45
done 2>&1 | expand -t6,45
echo

+ 1
- 1
package/jimmy/motor/motor.conf

@ -22,7 +22,7 @@
motor_postmake() {
chown -R root.root $datadir/$pkg/templates
chown -R root:root $datadir/$pkg/templates
cp -fR tutorial $docdir
}

+ 4
- 4
package/jimmy/mplayer-fonts/mplayer-fonts.conf

@ -32,13 +32,13 @@ mplayer_fonts_main() {
unzip -q -o -d mp_font3 $archdir/mp_font3.zip
mv -f mp_font3/README $docdir/README-mp_font3
chown -f root.root $docdir/README-mp_font3
chown -f root:root $docdir/README-mp_font3
unzip -q -o $archdir/bgfont.zip
cp -f mp_font3/arpi* bgfont
tar $taropt $archdir/mplayerfonts_win1251_v1.tar.bz2
chown -R root.root windows-1251
chown -R root:root windows-1251
mv -f windows-1251/README $docdir/README-windows-1251
mv -f windows-1251/README.bg $docdir/README.bg-windows-1251
for i in `ls windows-1251` ; do
@ -49,12 +49,12 @@ mplayer_fonts_main() {
rmdir windows-1251
tar $taropt $archdir/koi8r-font.tar.bz2
chown -R root.root koi8r-font
chown -R root:root koi8r-font
cp -f mp_font3/arpi* koi8r-font
mkdir -p mpfont_cyr
tar $taropt $archdir/mpfont_cyr.tar.bz2 -C mpfont_cyr
chown -R root.root mpfont_cyr
chown -R root:root mpfont_cyr
cp -f mp_font3/arpi* mpfont_cyr
}

+ 1
- 1
package/jimmy/mplayer/mplayer.conf

@ -50,7 +50,7 @@ mplayer_postmake() {
rm -f $sysconfdir/*.older
echo "correcting permissions and ownership ..."
chown -R root.root $datadir/$pkg $docdir $sysconfdir
chown -R root:root $datadir/$pkg $docdir $sysconfdir
find $datadir/$pkg $docdir $sysconfdir -type d | xargs -r chmod 0755
find $datadir/$pkg $docdir $sysconfdir -type f | xargs -r chmod 0644
}

+ 3
- 3
package/powerpc/yaboot/stone_mod_yaboot.sh

@ -107,11 +107,11 @@ yaboot_install_doit() {
device4()
{
dev="`grep \" $1 \" /proc/mounts | tail -1 | \
dev="`grep \" $1 \" /proc/mounts | tail -n 1 | \
cut -d ' ' -f 1`"
try="`dirname $1`"
if [ ! "$dev" ] ; then
dev="`grep \" $try \" /proc/mounts | tail -1 | \
dev="`grep \" $try \" /proc/mounts | tail -n 1 | \
cut -d ' ' -f 1`"
fi
if [ -h "$dev" ] ; then
@ -138,7 +138,7 @@ main() {
bootdev="`device4 /boot`"
yabootdev="`device4 /usr`"
macosxpart="`pdisk -l /dev/discs/disc0/disc | grep Apple_HFS | head -1 | \
macosxpart="`pdisk -l /dev/discs/disc0/disc | grep Apple_HFS | head -n 1 | \
sed -e "s/:.*//" -e "s/ //g"`"
[ "$macosxpart" ] && macosxdev="`realpath /dev/discs/disc0/part$macosxpart`"

+ 2
- 2
package/x86/grub/stone_mod_grub.sh

@ -92,9 +92,9 @@ grub_install() {
main() {
while
rootdev="`grep ' / ' /proc/mounts | tail -1 | \
rootdev="`grep ' / ' /proc/mounts | tail -n 1 | \
awk '/\/dev\// { print $1; }'`"
bootdev="`grep ' /boot ' /proc/mounts | tail -1 | \
bootdev="`grep ' /boot ' /proc/mounts | tail -n 1 | \
awk '/\/dev\// { print $1; }'`"
[ -z "$bootdev" ] && bootdev="$rootdev"

+ 1
- 1
package/x86/lilo/stone_mod_lilo.sh

@ -23,7 +23,7 @@
# [MAIN] 70 lilo LILO Boot Loader Setup
create_lilo_conf() {
i=0 ; rootdev="`grep ' / ' /proc/mounts | tail -1 | \
i=0 ; rootdev="`grep ' / ' /proc/mounts | tail -n 1 | \
awk '/\/dev\// { print $1; }'`"
rootdev="$( cd `dirname $rootdev` ; pwd -P )/$( basename $rootdev )"
while [ -L $rootdev ] ; do

+ 5
- 5
scripts/Build-Pkg

@ -362,7 +362,7 @@ if [ $this_is_the_2nd_run = 0 ] ; then
for stagelevel in 0 1 2 3 4 5 6 7 8 9 ; do
x="$root/var/adm/logs/$stagelevel-$xpkg.err"
if [ -f "$x" ] ; then
tail -50 "$x" | \
tail -n 50 "$x" | \
sed "s,^,[$stagelevel-ERROR] ,"
echo
fi
@ -956,13 +956,13 @@ if [ "$ROCKCFG_SRC_TMPFS_LOG" = 1 -a -n "$( type -p df )" ]; then
mkdir -p $root/var/adm/rock-debug
if [ ! -f $root/var/adm/rock-debug/tmpfslog.txt ] ; then
echo -e "# Config\tPackage\tInodes\tKB" | \
expand -20 > $root/var/adm/rock-debug/tmpfslog.txt
expand -t20 > $root/var/adm/rock-debug/tmpfslog.txt
fi
echo -e "$config\t$stagelevel-$xpkg\t$(
df 2> /dev/null -Pi $builddir | tail -1 | tr -s ' ' | cut -f3 -d' '
df 2> /dev/null -Pi $builddir | tail -n 1 | tr -s ' ' | cut -f3 -d' '
)\t$(
df 2> /dev/null -Pk $builddir | tail -1 | tr -s ' ' | cut -f3 -d' ')" | \
expand -20 >> $root/var/adm/rock-debug/tmpfslog.txt
df 2> /dev/null -Pk $builddir | tail -n 1 | tr -s ' ' | cut -f3 -d' ')" | \
expand -t20 >> $root/var/adm/rock-debug/tmpfslog.txt
fi
umount -r -d -f $builddir 2> /dev/null

+ 1
- 1
scripts/Build-Target

@ -147,7 +147,7 @@ in the right way, the nodes will automatically start building the jobs.
./scripts/Create-PkgQueue -cfg $config \
$nobrokendeps | sort -r -n -k2 | \
if [ $ROCKCFG_PARALLEL_MAX -gt 0 ]
then head -$ROCKCFG_PARALLEL_MAX
then head -n $ROCKCFG_PARALLEL_MAX
else cat ; fi > $qdir/queue.new
mv $qdir/queue.new $qdir/queue.txt
newqueue=0

+ 2
- 2
scripts/Build-Tools

@ -66,9 +66,9 @@ x="$( bash scripts/xfind.sh config/$config/. package/. scripts/. \
if [ "$x" ] ; then
echo_header Found $( echo "$x" | wc -l ) new/updated \
files in source tree:
echo "$x" | head -3 | sed 's,/\./,/,g' |
echo "$x" | head -n 3 | sed 's,/\./,/,g' |
while read y ; do echo_status $y ; done
[ "$( echo "$x" | tail +4 )" ] &&
[ "$( echo "$x" | tail -n +4 )" ] &&
echo_status "** list truncated to save space on the terminal **"
if [ "$ROCK_DEBUG_TOOLS_SKIP" = 1 ]; then

+ 4
- 4
scripts/Check-PkgVersion

@ -42,7 +42,7 @@ for package ; do
if [ -x $pdir/check-version ] ; then
sh $pdir/check-version
elif [ -f $pdir/$package.desc ] ; then
x="`egrep '^\[D\] ' $pdir/$package.desc | head -1 | tr -s ' '`"
x="`egrep '^\[D\] ' $pdir/$package.desc | head -n 1 | tr -s ' '`"
if [ -z "$x" ] ; then
echo "No [D] for package $package found!"
else
@ -62,19 +62,19 @@ for package ; do
if egrep -q '^\[CV-URL\] ' $pdir/$package.desc ; then
url="`egrep '^\[CV-URL\] ' \
$pdir/$package.desc | head -1 | \
$pdir/$package.desc | head -n 1 | \
tr -s ' ' | cut -f2 -d' '`"
fi
if egrep -q '^\[CV-PAT\]' $pdir/$package.desc ; then
pattern="`egrep '^\[CV-PAT\]' \
$pdir/$package.desc | head -1 | \
$pdir/$package.desc | head -n 1 | \
cut -s -f2- -d' '`"
fi
if egrep -q '^\[CV-DEL\]' $pdir/$package.desc ; then
delpattern="`egrep '^\[CV-DEL\]' \
$pdir/$package.desc | head -1 | \
$pdir/$package.desc | head -n 1 | \
cut -s -f2- -d' ' | tr -s ' '`"
fi

+ 3
- 3
scripts/Config

@ -327,16 +327,16 @@ editfile() {
}
editfile_action() {
line="`tail +$2 $1 | head -1`"
line="`tail -n +$2 $1 | head -n 1`"
./src/rockdialog.bin --title 'Build Config' \
--backtitle "$configtitle" \
--inputbox "$3 - Line $3" \
9 $(( $columns - 5 )) "$line" 2> config.out
head -$(( $2 - 1 )) $1 > $1.new
head -n $(( $2 - 1 )) $1 > $1.new
[ -s config.out ] && echo "`cat config.out`" >> $1.new
tail +$(( $2 + 1 )) $1 >> $1.new
tail -n +$(( $2 + 1 )) $1 >> $1.new
mv $1.new $1
}

+ 1
- 1
scripts/Create-CopyPatch

@ -56,7 +56,7 @@ do
grep -q -- '--- NO-ROCK-COPYRIGHT-NOTE ---' $filename && continue
tag="`grep -- '--- ROCK-COPYRIGHT-NOTE-BEGIN ---' \
$filename | sed 's,---.*,,' | head -1`"
$filename | sed 's,---.*,,' | head -n 1`"
cat $filename > $oldfile
if [ -z "$tag" -a '(' \

+ 1
- 1
scripts/Create-ErrList

@ -218,7 +218,7 @@ for stagelevel in $( echo $stages | tr -d '[]' | sed 's,.,& ,g' ) ; do
echo "[$stagelevel] $d ${tree:0:13}/${pkg:0:18}"
else
echo ; echo "== $stagelevel-$pkg.err =="
tail -20 "$logdir/$stagelevel-$pkg.err" | \
tail -n 20 "$logdir/$stagelevel-$pkg.err" | \
tac | perl -e '
my @lines;
my $counter;

+ 3
- 3
scripts/Create-ParaSim

@ -62,7 +62,7 @@ if [ "$jobs" ] ; then
echo "plot [0:*] [0:$(( $maxjobs + 1 ))] \\"
next=""
for x in $( echo $jobs | tr , ' ' ) ; do
tm=$( tail -1 $dir/parasim_$x.dat | cut -f1 | \
tm=$( tail -n 1 $dir/parasim_$x.dat | cut -f1 | \
awk -F. '{ printf("%02d:%02d\n",
$1, 60*("0." $2)); }' )
echo -en "$next" ; next=', \\\n'
@ -95,12 +95,12 @@ if [ ! -f $dir/parasim.dat ] ; then
-logdir $dir/logs | sort -r -n -k2 > $dir/queue.txt
[ -s $dir/queue.txt ]
do
next="`head -1 $dir/queue.txt`" ; set $next
next="`head -n 1 $dir/queue.txt`" ; set $next
qid="$1-$6" ; touch $dir/logs/$qid.log
printf "%5d %5d %-30s %s\n" $(wc -l < $dir/queue.txt) \
$2 $qid "$( cut -f1,7 -d' ' $dir/queue.txt | \
tail +2 | tr '\n ' ' -' )" >> $dir/parasim.new
tail -n +2 | tr '\n ' ' -' )" >> $dir/parasim.new
echo -n .
done

+ 1
- 1
scripts/Download

@ -362,7 +362,7 @@ download_file() {
# Alternative Directory
#
if [ "$altdir" ] ; then
altfile=$(find $altdir/ -name `basename $bzfile` | head -1)
altfile=$(find $altdir/ -name `basename $bzfile` | head -n 1)
else
altfile=""
fi

+ 1
- 1
scripts/create-cache.sh

@ -53,7 +53,7 @@ fi
for stagelevel in 0 1 2 3 4 5 6 7 8 9 ; do
if [ -f "${varadm}/logs/$stagelevel-$pkg.err" ] ; then
tail -50 "${varadm}/logs/$stagelevel-$pkg.err" | \
tail -n 50 "${varadm}/logs/$stagelevel-$pkg.err" | \
sed "s,^,[$stagelevel-ERROR] ,"
echo
fi

+ 3
- 3
scripts/functions

@ -379,7 +379,7 @@ dump_env() {
${!Y*} ${!Z*} ${!_*}
do
[ $name = base ] && continue
if declare -p $name | head -1 | grep -qv '^declare -[a-z]*r'
if declare -p $name | head -n 1 | grep -qv '^declare -[a-z]*r'
then
declare -p $name | sed "s,\\(^\\|[\"=:]\\)$base\\([\"=:/]\\|\$\\),\\1\${base}\\2,g"
fi
@ -506,7 +506,7 @@ build_this_package() {
# Autodetect source tar and extract it
#
if [ $srctar = auto ] ; then
xsourceballs=$( echo "$desc_D" | head -1 | tr ' ' '\t' | tr -s '\t' | \
xsourceballs=$( echo "$desc_D" | head -n 1 | tr ' ' '\t' | tr -s '\t' | \
cut -f2 | sed 's,.\(t\?\)\(gz\|Z\)$,.\1bz2,' )
if [ -z "$xsourceballs" ] ; then
echo "Can't auto-detect srctar for package '$pkg'!"
@ -543,7 +543,7 @@ build_this_package() {
#
if [ "$chownsrcdir" = 1 ]; then
echo "Fixing ownership and permissions ..."
chown -R 0.0 $builddir/$xsrcdir
chown -R 0:0 $builddir/$xsrcdir
fi
#
if [ "$nocvsinsrcdir" = 1 ]; then

Loading…
Cancel
Save