forked from Tigro/spin-kickstarts-rfremix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-live-koji
executable file
·115 lines (103 loc) · 3.3 KB
/
create-live-koji
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
# Copyright (C) 2013 Red Hat Inc.
# SPDX-License-Identifier: GPL-2.0+
usage()
{
echo
echo "Create RFRemix Live images based on Fedora 23 package base"
echo "from internet."
echo
echo "create-live <imagename> <i686|x86_64|all> <version> <release>"
echo " -c - Cinnamon LiveCD"
echo " -w - Workstation (with GNOME) LiveCD"
echo " -k - KDE LiveCD"
echo " -x - XFCE LiveCD"
echo " -l - LXDE LiveCD"
echo " -m - MATE LiveCD"
echo " -a - ALL Images"
exit 2
}
case "$1" in
-c)
SPINS="Cinnamon"
;;
-w)
SPINS="Workstation"
;;
-k)
SPINS="KDE"
;;
-x)
SPINS="XFCE"
;;
-l)
SPINS="LXDE"
;;
-m)
SPINS="MATE_Compiz"
;;
-a)
SPINS="Workstation KDE XFCE LXDE MATE_Compiz Cinnamon"
;;
*)
usage
;;
esac
case "$2" in
all)
ARCHES="x86_64 i686"
;;
i686)
ARCHES="i686"
;;
x86_64)
ARCHES="x86_64"
;;
*)
usage
;;
esac
RELEASE=$3
BUILD=$4
if [ "x$RELEASE" == "x" -o "x$BUILD" == "x" ]; then
usage
fi
VERSION=$(echo $RELEASE | awk -F[.-] '{ print $1 }')
KSEXTRAARGS="-v F21"
if [ "$VERSION" == "rawhide" ]; then
TARGET=rawhide
else
TARGET=dist-rfr$VERSION
fi
GITHASH=$(git rev-parse --short HEAD)
for spin in $SPINS
do
declare -l lspin
lspin=$spin
ksflatten $KSEXTRAARGS -c rfremix-live-$lspin-ru_RU.ks -o rfremix-live-$lspin-$GITHASH-ru_RU.ks >& /dev/null
for ARCH in $ARCHES
do
if [[ $ARCH == i686 ]]
then BASEARCH=i386
else BASEARCH=$ARCH
fi
koji spin-livecd --release $BUILD --noprogress RFRemix-Live-$spin-$ARCH $RELEASE --nowait \
--repo=http://mirror.yandex.ru/fedora/linux/releases/$VERSION/Everything/$BASEARCH/os/ \
--repo=http://mirror.yandex.ru/fedora/linux/updates/$VERSION/$BASEARCH/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/free/fedora/releases/22/Everything/$BASEARCH/os/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/free/fedora/updates/22/$BASEARCH/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/free/fedora/updates/testing/$VERSION/$BASEARCH/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/nonfree/fedora/releases/22/Everything/$BASEARCH/os/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/nonfree/fedora/updates/22/$BASEARCH/ \
--repo=http://mirror.yandex.ru/fedora/rpmfusion/nonfree/fedora/updates/testing/$VERSION/$BASEARCH/ \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/branding/fedora/releases/$VERSION/Everything/$BASEARCH/os \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/branding/fedora/updates/$VERSION/$BASEARCH \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/fixes/fedora/releases/$VERSION/Everything/$BASEARCH/os \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/fixes/fedora/updates/$VERSION/$BASEARCH \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/free/fedora/releases/$VERSION/Everything/$BASEARCH/os \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/free/fedora/updates/$VERSION/$BASEARCH \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/nonfree/fedora/releases/$VERSION/Everything/$BASEARCH/os \
--repo=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/nonfree/fedora/updates/$VERSION/$BASEARCH \
$TARGET $ARCH rfremix-live-$lspin-$GITHASH-ru_RU.ks
done
done