summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-02-15 23:35:26 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-02-21 16:48:17 +0100
commitcd84eaf5a82cae5414245cc24eb94b06fc1b9b4f (patch)
tree339c83f945fa038139e6b6e403156f0ccb8a1162
parent27e8f1071c18b2f0cbf4deb84a1222db64a3d5dc (diff)
downloaddbscripts-cd84eaf5a82cae5414245cc24eb94b06fc1b9b4f.tar.gz
dbscripts-cd84eaf5a82cae5414245cc24eb94b06fc1b9b4f.tar.xz
remove unused script
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rwxr-xr-xconvert-to-any71
1 files changed, 0 insertions, 71 deletions
diff --git a/convert-to-any b/convert-to-any
deleted file mode 100755
index 53d1a7b..0000000
--- a/convert-to-any
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-#
-# Converts an existing architecture-independent package
-# for i686 or x86_64 into a package with "arch = any"
-#
-
-# -- Abhishek Dasgupta <abhidg@gmail.com>
-
-[ "$UID" = "" ] && UID=$(uid)
-OUTDIR="$(pwd)"
-WORKDIR="/tmp/convert-to-any.$UID"
-
-if [ $# -ne 1 ]; then
- echo "Syntax: $(basename $0) <package-file>"
- exit 1
-fi
-
-. "$(dirname $0)/db-functions"
-. "$(dirname $0)/config"
-
-cleanup() {
- trap '' 0 2
- rm -rf "$WORKDIR"
- [ "$1" ] && exit $1
-}
-
-ctrl_c() {
- echo "Interrupted" >&2
- cleanup 0
-}
-
-die() {
- echo "$*" >&2
- cleanup 1
-}
-
-mkdir -p "$WORKDIR/build"
-
-oldpkgname="$1"
-
-if [ -z "$oldpkgname" ]; then
- die "convert-to-any: which package to convert?"
-fi
-
-pkg="$(basename $oldpkgname)"
-newpkgname=$(echo $pkg | sed "s/-\(i686\|x86_64\)$PKGEXT/-any$PKGEXT/")
-
-if ! cp "$oldpkgname" "$WORKDIR/build/$pkg"; then
- die "convert-to-any: failed to copy package to $WORKDIR"
-fi
-pushd "$WORKDIR/build" >/dev/null
-
-# Conversion of i686 package into "any" package.
-mkdir -p package
-if ! fakeroot bsdtar xf "$pkg" -C package; then
- die "convert-to-any: error in extracting $oldpkgname"
-fi
-
-sed -i "s/arch = \(i686\|x86_64\)/arch = any/g" package/.PKGINFO
-pushd package >/dev/null
-case "$newpkgname" in
- *tar.gz) TAR_OPT="z" ;;
- *tar.bz2) TAR_OPT="j" ;;
- *tar.xz) TAR_OPT="J" ;;
- *) die "$newpkgname does not have a valid archive extension." ;;
-esac
-fakeroot bsdtar c${TAR_OPT}f "$OUTDIR/$newpkgname" .PKGINFO *
-popd >/dev/null
-
-popd >/dev/null
-cleanup