3 # restore binary-all links
4 # Copyright (C) 2000 James Troup <james@nocrew.org>
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 # WARNING: this is a quick hack to fix several architectures in sid;
21 # it has lots of things hardcoded when they shouldn't be etc.
23 #######################################################################
24 source `dirname $0`/vars
30 #######################################################################
36 echo "usage: $progname [-n] architecture" 1>&2
39 # Write error message to stderr and quit.
41 echo "$progname: $@" 1>&2
45 # Check for at least one argument
57 -n|--dry-run) dry_run="yes"; shift 1;;
59 -h|--help) usage; exit 0 ;;
60 -*) error "unknown option $1" ;;
67 if [ ! -d main/binary-$1 ]; then
68 echo "Can't find arch $1"
72 echo "About to run this horrible script for arch $1 which will probably break things."
73 echo -n "Are you sure? [Y/n]: "
75 if [ -z "$answer" ]; then answer="y"; fi
77 n|N) echo "Aborting..";exit 0;;
79 *) echo "E: '$answer' not understood, exiting.";rm .genreport; exit 1;;
82 for j in main non-free contrib; do
83 for i in $(find $j/binary-all/ ! -type d); do
84 dir=$(dirname $i | sed -e "s/binary-all/binary-$1/")
86 if [ ! -e $(basename $i) ]; then
87 if [ "$dry_run" = "no" ]; then
91 echo "Would link to $i"
93 count=$(expr $count + 1)
99 echo "Added $count links."