source: trunk/mindi/install.sh @ 158

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

merge -r155:157 $SVN_M/branches/2.05

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