Whitespace fixes/cleanup to all of the scripts
Add the same vim modeline to all the files, as well as cleanup the newly added scripts a bit. If you look at this diff with the -w option, you'll see it really isn't all that significant. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
c229a696a2
commit
f05495dfc8
2
checkpkg
2
checkpkg
|
@ -73,3 +73,5 @@ if diff filelist-old filelist | grep '\.so\.' > /dev/null 2>&1; then
|
||||||
else
|
else
|
||||||
echo "No filename differences"
|
echo "No filename differences"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
122
extrapkg
122
extrapkg
|
@ -5,8 +5,8 @@ source /etc/makepkg.conf
|
||||||
cmd=`basename $0`
|
cmd=`basename $0`
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
if [ ! -f PKGBUILD ]; then
|
||||||
echo "No PKGBUILD file"
|
echo "No PKGBUILD file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source PKGBUILD
|
source PKGBUILD
|
||||||
|
@ -14,90 +14,92 @@ pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
|
||||||
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
|
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
|
||||||
|
|
||||||
if [ ! -f $pkgfile ]; then
|
if [ ! -f $pkgfile ]; then
|
||||||
if [ -f $PKGDEST/$pkgfile ]; then
|
if [ -f $PKGDEST/$pkgfile ]; then
|
||||||
pkgfile=$PKGDEST/$pkgfile
|
pkgfile=$PKGDEST/$pkgfile
|
||||||
oldstylepkgfile=$PKGDEST/$oldstylepkgfile
|
oldstylepkgfile=$PKGDEST/$oldstylepkgfile
|
||||||
elif [ -f $oldstylepkgfile ]; then
|
elif [ -f $oldstylepkgfile ]; then
|
||||||
pkgfile=$oldstylepkgfile
|
pkgfile=$oldstylepkgfile
|
||||||
elif [ -f $PKGDEST/$oldstylepkgfile ]; then
|
elif [ -f $PKGDEST/$oldstylepkgfile ]; then
|
||||||
pkgfile=$PKGDEST/$oldstylepkgfile
|
pkgfile=$PKGDEST/$oldstylepkgfile
|
||||||
else
|
else
|
||||||
echo "File $pkgfile doesn't exist"
|
echo "File $pkgfile doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$cmd" == "extrapkg" ]; then
|
if [ "$cmd" == "extrapkg" ]; then
|
||||||
repo="extra"
|
repo="extra"
|
||||||
tag="CURRENT"
|
tag="CURRENT"
|
||||||
elif [ "$cmd" == "corepkg" ]; then
|
elif [ "$cmd" == "corepkg" ]; then
|
||||||
repo="core"
|
repo="core"
|
||||||
tag="CURRENT"
|
tag="CURRENT"
|
||||||
elif [ "$cmd" == "testingpkg" ]; then
|
elif [ "$cmd" == "testingpkg" ]; then
|
||||||
repo="testing"
|
repo="testing"
|
||||||
tag="TESTING"
|
tag="TESTING"
|
||||||
elif [ "$cmd" == "unstablepkg" ]; then
|
elif [ "$cmd" == "unstablepkg" ]; then
|
||||||
repo="unstable"
|
repo="unstable"
|
||||||
tag="CURRENT"
|
tag="CURRENT"
|
||||||
elif [ "$cmd" == "communitypkg" ]; then
|
elif [ "$cmd" == "communitypkg" ]; then
|
||||||
repo="community"
|
repo="community"
|
||||||
tag="CURRENT"
|
tag="CURRENT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# see if any limit options were passed, we'll send them to SCP
|
# see if any limit options were passed, we'll send them to SCP
|
||||||
unset scpopts
|
unset scpopts
|
||||||
if [ "$1" = "-l" ]; then
|
if [ "$1" = "-l" ]; then
|
||||||
scpopts="$1 $2"
|
scpopts="$1 $2"
|
||||||
shift 2
|
shift 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$repo" != "community" ]; then
|
if [ "$repo" != "community" ]; then
|
||||||
scp ${scpopts} ${pkgfile} archlinux.org:staging/$repo/add
|
scp ${scpopts} ${pkgfile} archlinux.org:staging/$repo/add
|
||||||
if [ "$(md5sum ${pkgfile} | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum staging/${repo}/add/$(basename ${pkgfile}) | cut -d' ' -f1)" ]; then
|
if [ "$(md5sum ${pkgfile} | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum staging/${repo}/add/$(basename ${pkgfile}) | cut -d' ' -f1)" ]; then
|
||||||
echo "File got corrupted during upload, cancelled."
|
echo "File got corrupted during upload, cancelled."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "File integrity okay."
|
echo "File integrity okay."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ ! -f ~/.tupkg ]; then
|
if [ ! -f ~/.tupkg ]; then
|
||||||
echo "Must configure tupkg via ~/.tupkg, cancelled"
|
echo "Must configure tupkg via ~/.tupkg, cancelled"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
|
if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
|
||||||
echo "Renaming makepkg3 package for compatability"
|
echo "Renaming makepkg3 package for compatability"
|
||||||
mv $pkgfile $oldstylepkgfile
|
mv $pkgfile $oldstylepkgfile
|
||||||
pkgfile=$oldstylepkgfile
|
pkgfile=$oldstylepkgfile
|
||||||
fi
|
fi
|
||||||
tupkg $pkgfile
|
tupkg $pkgfile
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Cancelled"
|
echo "Cancelled"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "===> Uploaded $pkgfile"
|
echo "===> Uploaded $pkgfile"
|
||||||
|
|
||||||
if [ "$1" != "" ]; then
|
if [ "$1" != "" ]; then
|
||||||
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel
|
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel
|
||||||
$1" > /dev/null
|
$1" > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Cancelled"
|
echo "Cancelled"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel
|
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel
|
||||||
$1\" message"
|
$1\" message"
|
||||||
else
|
else
|
||||||
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel" > /dev/null
|
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel" > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Cancelled"
|
echo "Cancelled"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel\" message"
|
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel\" message"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cvs tag -c -F -R $tag > /dev/null
|
cvs tag -c -F -R $tag > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Cancelled"
|
echo "Cancelled"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "===> Tagged as $tag"
|
echo "===> Tagged as $tag"
|
||||||
|
|
||||||
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
59
finddeps
59
finddeps
|
@ -1,36 +1,41 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# finddeps - find packages that depend on a given depname
|
||||||
|
#
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
echo "usage: finddep <depname>"
|
echo "usage: finddeps <depname>"
|
||||||
echo ""
|
echo ""
|
||||||
echo "run this script from the top-level directory of your ABS tree"
|
echo "Find packages that depend on a given depname."
|
||||||
echo ""
|
echo "Run this script from the top-level directory of your ABS tree."
|
||||||
exit 0
|
echo ""
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
match=$1
|
match=$1
|
||||||
tld=`pwd`
|
tld=$(pwd)
|
||||||
|
|
||||||
for d in `find . -type d`; do
|
for d in $(find . -type d); do
|
||||||
cd $d
|
cd $d
|
||||||
if [ -f PKGBUILD ]; then
|
if [ -f PKGBUILD ]; then
|
||||||
unset pkgname depends makedepends
|
unset pkgname depends makedepends
|
||||||
. PKGBUILD
|
. PKGBUILD
|
||||||
for dep in "${depends[@]}"; do
|
for dep in "${depends[@]}"; do
|
||||||
# lose the version comaparator, if any
|
# lose the version comaparator, if any
|
||||||
depname=${dep%%[<>=]*}
|
depname=${dep%%[<>=]*}
|
||||||
if [ "$depname" = "$match" ]; then
|
if [ "$depname" = "$match" ]; then
|
||||||
echo $pkgname
|
echo $pkgname
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for dep in "${makedepends[@]}"; do
|
for dep in "${makedepends[@]}"; do
|
||||||
# lose the version comaparator, if any
|
# lose the version comaparator, if any
|
||||||
depname=${dep%%[<>=]*}
|
depname=${dep%%[<>=]*}
|
||||||
if [ "$depname" = "$match" ]; then
|
if [ "$depname" = "$match" ]; then
|
||||||
echo $pkgname
|
echo $pkgname
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
cd $tld
|
cd $tld
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
42
lddd
42
lddd
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# 2004/08/22 K. Piche Find missing library references.
|
#
|
||||||
# modified by Tobias Powalowski <tpowa@archlinux.org>
|
# lddd - find broken library links on your machine
|
||||||
|
#
|
||||||
|
|
||||||
ifs=$IFS
|
ifs=$IFS
|
||||||
IFS=':'
|
IFS=':'
|
||||||
|
|
||||||
|
@ -11,35 +13,35 @@ TEMPDIR=$(mktemp /tmp/lddd-script.XXXX)
|
||||||
rm $TEMPDIR
|
rm $TEMPDIR
|
||||||
mkdir -p $TEMPDIR
|
mkdir -p $TEMPDIR
|
||||||
|
|
||||||
echo " Go out drink some tea, this will take a while :) ..."
|
echo " Go out and drink some tea, this will take a while :) ..."
|
||||||
# Check ELF binaries in the PATH and specified dir trees.
|
# Check ELF binaries in the PATH and specified dir trees.
|
||||||
for tree in $PATH $libdirs $extras
|
for tree in $PATH $libdirs $extras
|
||||||
do
|
do
|
||||||
echo DIR $tree
|
echo DIR $tree
|
||||||
|
|
||||||
# Get list of files in tree.
|
# Get list of files in tree.
|
||||||
files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! -name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name '*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' ! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' ! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name '*.msg' ! -name '*.mcopclass' ! -name '*.mcoptype')
|
files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! -name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name '*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' ! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' ! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name '*.msg' ! -name '*.mcopclass' ! -name '*.mcoptype')
|
||||||
IFS=$ifs
|
IFS=$ifs
|
||||||
for i in $files
|
for i in $files
|
||||||
do
|
do
|
||||||
if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
|
if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
|
||||||
# Is an ELF binary.
|
# Is an ELF binary.
|
||||||
if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
|
if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
|
||||||
# Missing lib.
|
# Missing lib.
|
||||||
echo "$i:" >> $TEMPDIR/raw.txt
|
echo "$i:" >> $TEMPDIR/raw.txt
|
||||||
ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
|
ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
grep '^/' $TEMPDIR/raw.txt | sed -e 's/://g' >> $TEMPDIR/affected-files.txt
|
grep '^/' $TEMPDIR/raw.txt | sed -e 's/://g' >> $TEMPDIR/affected-files.txt
|
||||||
# invoke pacman
|
# invoke pacman
|
||||||
for i in $(cat $TEMPDIR/affected-files.txt); do
|
for i in $(cat $TEMPDIR/affected-files.txt); do
|
||||||
pacman -Qo $i | awk '{print $4,$5}' >> $TEMPDIR/pacman.txt
|
pacman -Qo $i | awk '{print $4,$5}' >> $TEMPDIR/pacman.txt
|
||||||
done
|
done
|
||||||
# clean list
|
# clean list
|
||||||
sort -u $TEMPDIR/pacman.txt >> $TEMPDIR/possible-rebuilds.txt
|
sort -u $TEMPDIR/pacman.txt >> $TEMPDIR/possible-rebuilds.txt
|
||||||
|
|
||||||
echo "Files saved to $TEMPDIR"
|
echo "Files saved to $TEMPDIR"
|
||||||
|
|
||||||
exit
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
|
@ -57,8 +57,8 @@ if [ "$EUID" != "0" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
if [ ! -f PKGBUILD ]; then
|
||||||
echo "This must be run in a directory containing a PKGBUILD."
|
echo "This must be run in a directory containing a PKGBUILD."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
source PKGBUILD
|
source PKGBUILD
|
||||||
|
|
||||||
|
@ -123,12 +123,14 @@ chmod +x "$uniondir/chrootbuild"
|
||||||
mkarchroot -r "/chrootbuild" "$uniondir"
|
mkarchroot -r "/chrootbuild" "$uniondir"
|
||||||
|
|
||||||
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
|
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
|
||||||
echo "Build failed, check \$CHROOT_DIR/rw/build"
|
echo "Build failed, check \$CHROOT_DIR/rw/build"
|
||||||
rm ${chrootdir}/rw/build/BUILD_FAILED
|
rm ${chrootdir}/rw/build/BUILD_FAILED
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
source ${WORKDIR}/PKGBUILD
|
source ${WORKDIR}/PKGBUILD
|
||||||
mv ${chrootdir}/rw/build/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR}
|
mv ${chrootdir}/rw/build/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR}
|
||||||
rm -rf ${chrootdir}/rw/build/*
|
rm -rf ${chrootdir}/rw/build/*
|
||||||
echo "Build complete"
|
echo "Build complete"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
|
@ -98,7 +98,7 @@ chroot_umount ()
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
if [ "$RUN" != "" ]; then
|
if [ "$RUN" != "" ]; then
|
||||||
# run chroot {{{
|
# run chroot {{{
|
||||||
#Sanity check
|
#Sanity check
|
||||||
if [ ! -f "${working_dir}/.arch-chroot" ]; then
|
if [ ! -f "${working_dir}/.arch-chroot" ]; then
|
||||||
echo "error: '${working_dir}' does not appear to be a Arch chroot"
|
echo "error: '${working_dir}' does not appear to be a Arch chroot"
|
||||||
|
@ -111,9 +111,9 @@ if [ "$RUN" != "" ]; then
|
||||||
echo "starting chroot ($RUN)"
|
echo "starting chroot ($RUN)"
|
||||||
chroot "${working_dir}" ${RUN}
|
chroot "${working_dir}" ${RUN}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
else
|
else
|
||||||
# {{{ build chroot
|
# {{{ build chroot
|
||||||
if [ -e "${working_dir}" -a "${FORCE}" = "n" ]; then
|
if [ -e "${working_dir}" -a "${FORCE}" = "n" ]; then
|
||||||
echo "error: working dir '${working_dir}' already exists - try using -f"
|
echo "error: working dir '${working_dir}' already exists - try using -f"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -174,7 +174,7 @@ else
|
||||||
if [ ! -e "${working_dir}/.arch-chroot" ]; then
|
if [ ! -e "${working_dir}/.arch-chroot" ]; then
|
||||||
date +%s > "${working_dir}/.arch-chroot"
|
date +%s > "${working_dir}/.arch-chroot"
|
||||||
fi
|
fi
|
||||||
# }}}
|
# }}}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim:ft=sh:ts=4:sw=4:et:
|
# vim:ft=sh:ts=4:sw=4:et:
|
||||||
|
|
Loading…
Reference in New Issue