summaryrefslogtreecommitdiffstats
path: root/build_tools/archiso-19/mythvantage/go.sh
blob: 399cae8c9adf66474d7096027e86af79ef8c94fa (plain)
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
76
77
78
79
80
81
82
#!/bin/bash

function copy_custom(){
    cp -f profile_files/$1.png syslinux/splash.png || exit 1
    cp -f profile_files/pacman.conf . ||exit 1
    cat profile_files/$1.pacman >> ./pacman.conf || exit 1

    cp -f profile_files/packages.x86_64 . || exit 1
    cp -f profile_files/packages.x86_64.cache . || exit 1
    cp -f profile_files/pristine.list . || exit 1
    }




declare -a menuarray

menuarray=( 'local_mirror_testing'
            'local_disk_testing'
            'remote_testing'
            '-----------------'
            'local_mirror_release'
            'remote_release' )

#echo ${array1[@]}

element_count=${#menuarray[*]}
element_count=`expr $element_count - 1`
clear
echo
echo
if [  x$1 = x ]
then
    for i in `seq 0 $element_count`
    do
        echo "$i ) ${menuarray[$i]}"
        echo
    done
    echo "Select the profile to use:"
    read a
    if [ "x"$a = "x" ]
    then
        a="0"
    fi
    profile=${menuarray[$a]}

    echo $profile
    copy_custom $profile
    echo "Creating ISO"

    if [ ! -e work/x86_64/airootfs/dev/zero ]
    then
        rm -rf work/
    else
        echo "dev appears to be mounted in work"
        exit 2
    fi
    #./build.sh clean all
    ./build.sh -vv  build single netinstall
    status=$?
    if [ $status = 0 ]
    then
#         if [ -f /usr/bin/isohybrid ]
#         then
#             echo "Running isohybrid..."
#             /usr/bin/isohybrid /tmp/test2.iso
#         else
#             echo "Syslinux needs to be installed to run isohybrid"
#         fi

        echo "*****************************************************"
        echo "your $profile iso is complete (out/test3.iso)"
        echo "*****************************************************"
        rm -f pacman.conf
        rm -f packages.x86_64
        rm -f packages.x86_64.cache
        rm -f pristine.list
    fi

    date
    #cd $OLD
fi