summaryrefslogtreecommitdiff
path: root/debian/rebuild-gcj-db
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-25 14:19:31 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-25 14:19:31 +0300
commite06370f27bc2868df91c3a5f29dc7f95e3f9350a (patch)
tree2a62c7a345744ea034b5b889a1c3d4dfe6055301 /debian/rebuild-gcj-db
parent781434cd4f3b1be60b117ae61babaf60f4a9e563 (diff)
downloadgcc-defaults-debian.tar.gz
Imported gcc-defaults-1.185.1debian/1.185.1debian
Diffstat (limited to 'debian/rebuild-gcj-db')
-rw-r--r--debian/rebuild-gcj-db106
1 files changed, 0 insertions, 106 deletions
diff --git a/debian/rebuild-gcj-db b/debian/rebuild-gcj-db
deleted file mode 100644
index 297a00b..0000000
--- a/debian/rebuild-gcj-db
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/bash
-
-set -e
-
-if [ $# -gt 1 ]; then
- cat 1>&2 <<-EOF
- rebuild-gcj-db: re-build the gcj classmap database
-
- usage: $0 [install|remove]
- EOF
- exit 1
-fi
-
-mode=install
-case "$1" in
- install|remove)
- mode=$1;;
-esac
-
-uname=$(uname -m)
-
-rebuild_db()
-{
- dbtool=$1; shift
- dbLocation=$1; shift
- dirs=
-
- for dir; do [ -d $dir ] && dirs="$dirs $dir"; done
- if [ -z "$dirs" ]; then
- # no more dirs with .db files on the system
- return 0
- fi
- mkdir -p $(dirname $dbLocation)
- if $dbtool -n $dbLocation.tmp 64; then
- :
- #case "$uname" in parisc*)
- # echo >&2 "$dbtool succeeded unexpectedly"
- #esac
- else
- case "$uname" in
- m68k)
- echo >&2 "ERROR: $dbtool did fail; known problem on $uname"
- return 0;;
- *)
- exit 2
- esac
- fi
- find $dirs -follow -name '*.db' -print0 | \
- xargs -r -0 $dbtool -m $dbLocation.tmp $dbLocation.tmp || exit 1
- mv $dbLocation.tmp $dbLocation
-}
-
-
-rebuild_databases()
-{
- v=$1
- dbtool=gcj-dbtool-$1
- dbLocation=`$dbtool -p || true`
-
- if [ -n "$dbLocation" ]; then
- case "$uname" in m68k)
- echo >&2 "$dbtool succeeded unexpectedly"
- esac
- else
- case "$uname" in
- m68k)
- echo >&2 "ERROR: $dbtool did fail; known problem on $uname"
- return 0;;
- *)
- exit 2
- esac
- fi
-
- if [ "$mode" = remove ] && [ ! -f "$dbLocation" ]; then
- # libgcj7-0 or libgcj8 are already removed; no need
- # to rebuild anything
- return 0
- fi
- rebuild_db \
- $dbtool \
- $dbLocation \
- /usr/share/gcj/classmap.d \
- /usr/share/gcj-$v/classmap.d
-}
-
-# still different databases for each gcj-4.x
-
-if which gcj-dbtool-4.9 >/dev/null 2>&1; then
- rebuild_databases 4.9
-fi
-
-if which gcj-dbtool-4.8 >/dev/null 2>&1; then
- rebuild_databases 4.8
-fi
-
-if which gcj-dbtool-4.7 >/dev/null 2>&1; then
- rebuild_databases 4.7
-fi
-
-if which gcj-dbtool-4.6 >/dev/null 2>&1; then
- rebuild_databases 4.6
-fi
-
-if which gcj-dbtool-4.4 >/dev/null 2>&1; then
- rebuild_databases 4.4
-fi