Skip to content

Commit

Permalink
Improve helper scripts. Make them current directory indepdent.
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg committed Dec 2, 2009
1 parent 79666bd commit 0e43e35
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
11 changes: 8 additions & 3 deletions tools/cleandeb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/sh
#!/bin/bash

cd debian
tools_dir=$(dirname $0)
if [ "$tools_dir" == "." ]; then
tools_dir=$PWD
fi

cd ${tools_dir}/../debian
svn list > /tmp/debfiles
for file in *
do
grep -q ^$file$ /tmp/debfiles || rm -rf $file
done

cd -
30 changes: 24 additions & 6 deletions tools/package
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
rm -rf packages/pacparser-$1 packages/pacparser-$1.tar.gz
rsync -avz --exclude-from=package_excludes . packages/pacparser-$1
cd packages
tar cvf pacparser-$1.tar pacparser-$1
gzip pacparser-$1.tar
cp pacparser-$1.tar.gz pacparser_$1.orig.tar.gz
#!/bin/bash

ver=$1
[ -z $ver ] && echo "Please specify package version." && exit

tools_dir=$(dirname $0)
if [ "$tools_dir" == "." ]; then
tools_dir=$PWD
fi
pkg_dir=${tools_dir}/packages/pacparser-${ver}

if [ -d ${pkg_dir} ]; then
rm -rf ${pkg_dir}*
fi
mkdir -p ${pkg_dir}

cd ${tools_dir}/..
svn list -R | grep -v tools | rsync -av --files-from=- --no-dirs . ${pkg_dir}
cd -

cd ${tools_dir}/packages
tar cvf ${pkg_dir}.tar $(basename ${pkg_dir})
gzip ${pkg_dir}.tar
cp ${pkg_dir}.tar.gz ${pkg_dir/pacparser-/pacparser_}.orig.tar.gz
9 changes: 9 additions & 0 deletions tools/rman.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash -x

tools_dir=$(dirname $0)
if [ "$tools_dir" == "." ]; then
tools_dir=$PWD
fi

cd ${tools_dir}/../docs
for file in *.{1,3}
do
rman -f html -r '%s.%s.html' $file > html/$file.html
done
cd -

0 comments on commit 0e43e35

Please sign in to comment.