diff options
| author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2006-09-19 16:56:25 +0000 |
|---|---|---|
| committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2006-09-19 16:56:25 +0000 |
| commit | 397f31fcb0b47000c6e5c5c4aaf441970ce06e3a (patch) | |
| tree | 0df0e0bbc0ef9d4f2a388d4bd634e8683e9a36af /rebuildpkg | |
| parent | a5ad04283516a7ff72cfd33f3221cfd3c10c3b5b (diff) | |
| download | simplepkg-397f31fcb0b47000c6e5c5c4aaf441970ce06e3a.tar.gz simplepkg-397f31fcb0b47000c6e5c5c4aaf441970ce06e3a.tar.bz2 | |
simplepkg 0.4.9pre2
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@5 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'rebuildpkg')
| -rwxr-xr-x | rebuildpkg | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/rebuildpkg b/rebuildpkg deleted file mode 100755 index 43c76cd..0000000 --- a/rebuildpkg +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# -# rebuildpkg: build a package from a /var/log/packages entry -# -# feedback: rhatto at riseup.net | gpl -# -# Rebuildpkg is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. -# -# Rebuildpkg is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA -# - -COMMON="/usr/libexec/simplepkg/common.sh" -TMP="/tmp" - -function usage { - echo "usage: ROOT=/otherroot `basename $0` <package-name>" -} - -if [ -f "$COMMON" ]; then - source $COMMON -else - echo "error: file $COMMON found, check your `basename $0` installation" - exit 1 -fi - -if [ -z "$1" ]; then - usage - exit 1 -fi - -pack="$1" - -for file in `find $ROOT/var/log/packages -name $pack*`; do - if [[ "`package_name $file.tgz`" == "$pack" ]]; then - package_file="$file" - break - fi -done - -if [ -z "$package_file" ]; then - echo error: package $pack does not exist -fi - -if [ -d "$TMP/package-$pack" ]; then - rm -rf $TMP/package-$pack -fi - -mkdir $TMP/package-$pack -cd $TMP/package-$pack - -for file in `grep -v -e "^PACKAGE NAME:" -e "^UNCOMPRESSED PACKAGE SIZE:" \ - -e "^COMPRESSED PACKAGE SIZE:" -e "^PACKAGE LOCATION:" \ - -e "^PACKAGE DESCRIPTION:" -e "^$pack:" -e "^FILE LIST:" $package_file`; do - - if [ -d /$file ]; then - mkdir -p $TMP/package-$pack/$file - elif [ -f /$file ]; then - cp /$file $TMP/package-$pack/$file - else echo file /$file was not found, please add it manually, exploding and making the package again - fi - -done - -mkdir $TMP/package-$pack/install -grep "^$pack:" $package_file > $TMP/package-$pack/install/slack-desc - -package_name="`grep "PACKAGE NAME:" $package_file | awk '{ print $3 }'`" - -if [ -f "$ROOT/var/log/scripts/$package_name" ]; then - cp $ROOT/var/log/scripts/$package_name $TMP/package-$pack/install/doinst.sh -fi - -makepkg $package_name.tgz -mv $package_name.tgz $TMP/ -echo "done: package rebuilt and stored at $TMP/$package_name.tgz" |
