summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-28 21:20:24 -0600
committerDan McGee <dan@archlinux.org>2007-11-28 21:20:24 -0600
commitf05495dfc83739c795b5de9cf18e4cd6f29a7803 (patch)
treefc215294dc4a724d747648ceaef318f407d7c747
parentc229a696a23bf99c4dd8c4b40d942b74c0da1672 (diff)
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>
-rwxr-xr-xcheckpkg2
-rwxr-xr-xextrapkg122
-rwxr-xr-xfinddeps59
-rwxr-xr-xlddd42
-rwxr-xr-xmakechrootpkg20
-rwxr-xr-xmkarchroot8
6 files changed, 133 insertions, 120 deletions
diff --git a/checkpkg b/checkpkg
index 69046e8..cd08121 100755
--- a/checkpkg
+++ b/checkpkg
@@ -73,3 +73,5 @@ if diff filelist-old filelist | grep '\.so\.' > /dev/null 2>&1; then
else
echo "No filename differences"
fi
+
+# vim:ft=sh:ts=4:sw=4:et:
diff --git a/extrapkg b/extrapkg
index 18d3ea0..b63d273 100755
--- a/extrapkg
+++ b/extrapkg
@@ -5,8 +5,8 @@ source /etc/makepkg.conf
cmd=`basename $0`
if [ ! -f PKGBUILD ]; then
- echo "No PKGBUILD file"
- exit 1
+ echo "No PKGBUILD file"
+ exit 1
fi
source PKGBUILD
@@ -14,90 +14,92 @@ pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
if [ ! -f $pkgfile ]; then
- if [ -f $PKGDEST/$pkgfile ]; then
- pkgfile=$PKGDEST/$pkgfile
- oldstylepkgfile=$PKGDEST/$oldstylepkgfile
- elif [ -f $oldstylepkgfile ]; then
- pkgfile=$oldstylepkgfile
- elif [ -f $PKGDEST/$oldstylepkgfile ]; then
- pkgfile=$PKGDEST/$oldstylepkgfile
- else
- echo "File $pkgfile doesn't exist"
- exit 1
- fi
+ if [ -f $PKGDEST/$pkgfile ]; then
+ pkgfile=$PKGDEST/$pkgfile
+ oldstylepkgfile=$PKGDEST/$oldstylepkgfile
+ elif [ -f $oldstylepkgfile ]; then
+ pkgfile=$oldstylepkgfile
+ elif [ -f $PKGDEST/$oldstylepkgfile ]; then
+ pkgfile=$PKGDEST/$oldstylepkgfile
+ else
+ echo "File $pkgfile doesn't exist"
+ exit 1
+ fi
fi
if [ "$cmd" == "extrapkg" ]; then
- repo="extra"
- tag="CURRENT"
+ repo="extra"
+ tag="CURRENT"
elif [ "$cmd" == "corepkg" ]; then
- repo="core"
- tag="CURRENT"
+ repo="core"
+ tag="CURRENT"
elif [ "$cmd" == "testingpkg" ]; then
- repo="testing"
- tag="TESTING"
+ repo="testing"
+ tag="TESTING"
elif [ "$cmd" == "unstablepkg" ]; then
- repo="unstable"
- tag="CURRENT"
+ repo="unstable"
+ tag="CURRENT"
elif [ "$cmd" == "communitypkg" ]; then
- repo="community"
- tag="CURRENT"
+ repo="community"
+ tag="CURRENT"
fi
# see if any limit options were passed, we'll send them to SCP
unset scpopts
if [ "$1" = "-l" ]; then
- scpopts="$1 $2"
- shift 2
+ scpopts="$1 $2"
+ shift 2
fi
if [ "$repo" != "community" ]; then
- 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
- echo "File got corrupted during upload, cancelled."
- exit 1
- else
- echo "File integrity okay."
- fi
+ 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
+ echo "File got corrupted during upload, cancelled."
+ exit 1
+ else
+ echo "File integrity okay."
+ fi
else
- if [ ! -f ~/.tupkg ]; then
- echo "Must configure tupkg via ~/.tupkg, cancelled"
- exit 1
- fi
- if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
- echo "Renaming makepkg3 package for compatability"
- mv $pkgfile $oldstylepkgfile
- pkgfile=$oldstylepkgfile
- fi
- tupkg $pkgfile
+ if [ ! -f ~/.tupkg ]; then
+ echo "Must configure tupkg via ~/.tupkg, cancelled"
+ exit 1
+ fi
+ if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
+ echo "Renaming makepkg3 package for compatability"
+ mv $pkgfile $oldstylepkgfile
+ pkgfile=$oldstylepkgfile
+ fi
+ tupkg $pkgfile
fi
if [ $? -ne 0 ]; then
- echo "Cancelled"
- exit 1
+ echo "Cancelled"
+ exit 1
fi
echo "===> Uploaded $pkgfile"
if [ "$1" != "" ]; then
-cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel
-$1" > /dev/null
-if [ $? -ne 0 ]; then
- echo "Cancelled"
- exit 1
-fi
-echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel
-$1\" message"
+ cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel
+ $1" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Cancelled"
+ exit 1
+ fi
+ echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel
+ $1\" message"
else
-cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel" > /dev/null
-if [ $? -ne 0 ]; then
- echo "Cancelled"
- exit 1
-fi
-echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel\" message"
+ cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Cancelled"
+ exit 1
+ fi
+ echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel\" message"
fi
cvs tag -c -F -R $tag > /dev/null
if [ $? -ne 0 ]; then
- echo "Cancelled"
- exit 1
+ echo "Cancelled"
+ exit 1
fi
echo "===> Tagged as $tag"
+
+# vim:ft=sh:ts=4:sw=4:et:
diff --git a/finddeps b/finddeps
index e80c940..347a7cb 100755
--- a/finddeps
+++ b/finddeps
@@ -1,36 +1,41 @@
#!/bin/bash
+#
+# finddeps - find packages that depend on a given depname
+#
if [ "$1" = "" ]; then
- echo "usage: finddep <depname>"
- echo ""
- echo "run this script from the top-level directory of your ABS tree"
- echo ""
- exit 0
+ echo "usage: finddeps <depname>"
+ echo ""
+ echo "Find packages that depend on a given depname."
+ echo "Run this script from the top-level directory of your ABS tree."
+ echo ""
+ exit 0
fi
match=$1
-tld=`pwd`
+tld=$(pwd)
-for d in `find . -type d`; do
- cd $d
- if [ -f PKGBUILD ]; then
- unset pkgname depends makedepends
- . PKGBUILD
- for dep in "${depends[@]}"; do
- # lose the version comaparator, if any
- depname=${dep%%[<>=]*}
- if [ "$depname" = "$match" ]; then
- echo $pkgname
- fi
- done
- for dep in "${makedepends[@]}"; do
- # lose the version comaparator, if any
- depname=${dep%%[<>=]*}
- if [ "$depname" = "$match" ]; then
- echo $pkgname
- fi
- done
- fi
- cd $tld
+for d in $(find . -type d); do
+ cd $d
+ if [ -f PKGBUILD ]; then
+ unset pkgname depends makedepends
+ . PKGBUILD
+ for dep in "${depends[@]}"; do
+ # lose the version comaparator, if any
+ depname=${dep%%[<>=]*}
+ if [ "$depname" = "$match" ]; then
+ echo $pkgname
+ fi
+ done
+ for dep in "${makedepends[@]}"; do
+ # lose the version comaparator, if any
+ depname=${dep%%[<>=]*}
+ if [ "$depname" = "$match" ]; then
+ echo $pkgname
+ fi
+ done
+ fi
+ cd $tld
done
+# vim:ft=sh:ts=4:sw=4:et:
diff --git a/lddd b/lddd
index f436921..24f6e28 100755
--- a/lddd
+++ b/lddd
@@ -1,6 +1,8 @@
#!/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=':'
@@ -11,35 +13,35 @@ TEMPDIR=$(mktemp /tmp/lddd-script.XXXX)
rm $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.
for tree in $PATH $libdirs $extras
do
- echo DIR $tree
+ echo DIR $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')
- IFS=$ifs
- for i in $files
- do
- if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
- # Is an ELF binary.
- if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
- # Missing lib.
- echo "$i:" >> $TEMPDIR/raw.txt
- ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
- fi
- fi
- done
+ # 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')
+ IFS=$ifs
+ for i in $files
+ do
+ if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
+ # Is an ELF binary.
+ if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
+ # Missing lib.
+ echo "$i:" >> $TEMPDIR/raw.txt
+ ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
+ fi
+ fi
+ done
done
grep '^/' $TEMPDIR/raw.txt | sed -e 's/://g' >> $TEMPDIR/affected-files.txt
# invoke pacman
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
# clean list
sort -u $TEMPDIR/pacman.txt >> $TEMPDIR/possible-rebuilds.txt
echo "Files saved to $TEMPDIR"
-exit
+# vim:ft=sh:ts=4:sw=4:et:
diff --git a/makechrootpkg b/makechrootpkg
index be376e4..329def7 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -57,8 +57,8 @@ if [ "$EUID" != "0" ]; then
fi
if [ ! -f PKGBUILD ]; then
- echo "This must be run in a directory containing a PKGBUILD."
- exit 1
+ echo "This must be run in a directory containing a PKGBUILD."
+ exit 1
fi
source PKGBUILD
@@ -123,12 +123,14 @@ chmod +x "$uniondir/chrootbuild"
mkarchroot -r "/chrootbuild" "$uniondir"
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
- echo "Build failed, check \$CHROOT_DIR/rw/build"
- rm ${chrootdir}/rw/build/BUILD_FAILED
- exit 1
+ echo "Build failed, check \$CHROOT_DIR/rw/build"
+ rm ${chrootdir}/rw/build/BUILD_FAILED
+ exit 1
else
- source ${WORKDIR}/PKGBUILD
- mv ${chrootdir}/rw/build/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR}
- rm -rf ${chrootdir}/rw/build/*
- echo "Build complete"
+ source ${WORKDIR}/PKGBUILD
+ mv ${chrootdir}/rw/build/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR}
+ rm -rf ${chrootdir}/rw/build/*
+ echo "Build complete"
fi
+
+# vim:ft=sh:ts=4:sw=4:et:
diff --git a/mkarchroot b/mkarchroot
index dbe8344..e3d4a7d 100755
--- a/mkarchroot
+++ b/mkarchroot
@@ -98,7 +98,7 @@ chroot_umount ()
# }}}
if [ "$RUN" != "" ]; then
-# run chroot {{{
+ # run chroot {{{
#Sanity check
if [ ! -f "${working_dir}/.arch-chroot" ]; then
echo "error: '${working_dir}' does not appear to be a Arch chroot"
@@ -111,9 +111,9 @@ if [ "$RUN" != "" ]; then
echo "starting chroot ($RUN)"
chroot "${working_dir}" ${RUN}
-# }}}
+ # }}}
else
-# {{{ build chroot
+ # {{{ build chroot
if [ -e "${working_dir}" -a "${FORCE}" = "n" ]; then
echo "error: working dir '${working_dir}' already exists - try using -f"
exit 1
@@ -174,7 +174,7 @@ else
if [ ! -e "${working_dir}/.arch-chroot" ]; then
date +%s > "${working_dir}/.arch-chroot"
fi
-# }}}
+ # }}}
fi
# vim:ft=sh:ts=4:sw=4:et: