-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanual
executable file
·75 lines (65 loc) · 1.34 KB
/
manual
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
start="/mnt/cdrom"
if [ "$root" = "" ] ; then
echo "Error"
echo "h3knix root not defined, use \"export root=folder\""
echo ""
exit 1
fi
export inpath=$root
if [ "$1" = "" ] ; then
echo ""
echo "manual help"
echo "
This tool does not resolve dependencies
Install the appropriate capsules in correct order
\"core\" is required
\"base\" depends on core
\"ext\" depends on base
\"media\" depends on all
manual <group>
Installs the specified capsule group
manual <capsule>
Installs an extraneous capsule to root
root is defined by exporting root variable to env
example: \"export root=/mnt/h3knix\"
"
echo ""
exit 0
fi
if [ -e "$start/lists/$1.list" ] ; then
echo ""
echo " Installing $1"
if [ ! -d $root/caps ] ; then
mkdir -p $root/caps
fi
for i in `cat $start/lists/$1.list` ; do
echo "Extracting $i"
tar xjf $start/$i.cap -C $root/caps/
cd $root/caps/`basename $i`
sh main.sh
cd $start
echo ""
done
rm -rf $root/caps
echo "$1 installed"
echo ""
else
if [ -e "$1" ] ; then
echo "Installing $1"
if [ ! -d $root/caps ] ; then
mkdir -p $root/caps
fi
echo "Extracting $1"
tar xjf $1 -C $root/caps/
fname=`echo $1 | sed s/.cap//`
cd $root/caps/`basename $fname`
sh main.sh
cd $start
echo ""
rm -rf $root/caps
echo "$1 installed"
exit 0
fi
echo " List $1 not found"
fi