source: trunk/mindi/install.sh @ 110

Last change on this file since 110 was 30, checked in by bcornec, 14 years ago

Id property added on files to allow for better conf. management

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1#!/bin/sh
2
3if [ ! -f "mindi" ] ; then
4    echo "Please 'cd' to the directory you have just untarred." >> /dev/stderr
5    exit 1
6fi
7local=/usr
8# local=/usr/local
9if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then
10    local=/ramdisk/usr
11    export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH
12fi
13
14mkdir -p $local/share/mindi
15mkdir -p $local/sbin
16
17#for i in aux-tools dev rootfs ; do
18#    [ -e "$i.tgz" ] && continue
19#    cd $i
20#    tar -c * | gzip -9 > ../$i.tgz
21#    cd ..
22#    rm -Rf $i
23#done
24
25cp --parents -pRdf * $local/share/mindi/
26ln -sf $local/share/mindi/mindi $local/sbin/
27chmod +x $local/sbin/mindi
28echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH."
29( cd $local/share/mindi/rootfs && tar -xzf symlinks.tgz )
30ARCH=`/bin/arch`
31echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i386
32export ARCH
33( cd $local/share/mindi/rootfs && mv bin/busybox-$ARCH bin/busybox)
34if [ "$ARCH" = "i386" ] ; then
35    ( cd $local/share/mindi/rootfs && mv bin/busybox-$ARCH.net bin/busybox.net)
36fi
37if [ "$ARCH" = "ia64" ] ; then
38    make -f Makefile.parted2fdisk
39    make -f Makefile.parted2fdisk install
40    ( cd $local/share/mindi/rootfs && mv sbin/parted2fdisk-ia64 sbin/parted2fdisk)
41else
42    ( cd $local/share/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
43fi
44ls /etc/mindi/* > /dev/null 2>/dev/null
45[ "$?" -ne "0" ] && rm -Rf /etc/mindi
46exit 0
Note: See TracBrowser for help on using the repository browser.