summaryrefslogtreecommitdiffstats
path: root/redhat/genrpm.sh
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2012-05-07 01:06:08 +0200
committerFrancois Andriot <francois.andriot@free.fr>2012-05-07 01:06:08 +0200
commit9750a057f2f36c5b88a5bc53c0a051b605dac061 (patch)
tree4f205d3ed4ecf8d2df665b566674d12372363c7f /redhat/genrpm.sh
parent6bb431be79e8f75c26bbf0f81749fa7738965f65 (diff)
downloadtde-packaging-9750a057f2f36c5b88a5bc53c0a051b605dac061.tar.gz
tde-packaging-9750a057f2f36c5b88a5bc53c0a051b605dac061.zip
RHEL/Fedora: massive updates for Fedora 17 (TDE 3.5.13 entire build)
Diffstat (limited to 'redhat/genrpm.sh')
-rwxr-xr-xredhat/genrpm.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/redhat/genrpm.sh b/redhat/genrpm.sh
index 57e0ebad6..45cffeee6 100755
--- a/redhat/genrpm.sh
+++ b/redhat/genrpm.sh
@@ -13,24 +13,31 @@ done
clear
cat <<EOF
-$(< /etc/redhat-release) $(uname -m)
+$(< /etc/redhat-release) [$(uname -m)]
This script generates RPM of TDE from source tarball.
Please choose a TDE component to build.
EOF
# Checks RPMBUILD environment
-if [ $( rpm -E "%{rhel}" ) = "%{rhel}" ] && [ $( rpm -E "%{fedora}" ) = "%{fedora}" ]; then
+RHEL="$( rpm -E "%{rhel}" )"
+FEDORA="$( rpm -E "%{fedora}" )"
+if [ "${RHEL}" = "%{rhel}" ] && [ "${FEDORA}" = "%{fedora}" ]; then
cat <<EOF
Error: RPM macro %rhel or %fedora must be set to the distribution version to build !
E.g:
-%rhel 6
-or
-%fedora 15
+ %rhel 6
+or:
+ %fedora 15
EOF
exit 1
fi
+# Checks TDE version to use
+#if [ -z "${REQVERSION}" ]; then
+# REQVERSION="3.5.13"
+#fi
+
if [ -z "${COMP}" ]; then
select COMP in $( cut -f1 "components.txt" | grep -v "^#" ) ; do break; done
fi