Make --check-requirements conditional, and some code cleanups
This commit is contained in:
parent
d4ba5c61aa
commit
5c4ba39cea
@ -4,10 +4,10 @@
|
||||
#
|
||||
# The Cling Interpreter
|
||||
#
|
||||
# tools/packaging/build.sh: Script to compile Cling and produce tarballs for
|
||||
# all platforms
|
||||
# Cling Packaging Tool (CPT)
|
||||
#
|
||||
# TODO: Add documentation here, or provide link to documentation
|
||||
# tools/packaging/build.sh: Helper script to compile Cling and produce tarballs
|
||||
# for multiple platforms.
|
||||
#
|
||||
# Author: Anirudha Bose <ani07nov@gmail.com>
|
||||
#
|
||||
|
@ -35,9 +35,9 @@ source $(dirname ${0})/debian/debianize.sh
|
||||
|
||||
function usage {
|
||||
echo ""
|
||||
echo "debianize.sh: Script to compile Cling and produce tarballs and/or Debian packages"
|
||||
echo "Cling Packaging Tool"
|
||||
echo ""
|
||||
echo "Usage: ./debianize.sh {arg}"
|
||||
echo "Usage: ./cpt.sh {arg}"
|
||||
echo -e " -h, --help\t\t\tDisplay this help and exit"
|
||||
echo -e " --check-requirements\tCheck if packages required by the script are installed"
|
||||
echo -e " --current-dev-tarball\tCompile the latest development snapshot and produce a tarball"
|
||||
@ -48,8 +48,7 @@ function usage {
|
||||
}
|
||||
|
||||
while [ "${1}" != "" ]; do
|
||||
if [ "${#}" != 1 ];
|
||||
then
|
||||
if [ "${#}" != 1 ]; then
|
||||
echo "Error: script can handle only one switch at a time"
|
||||
usage
|
||||
exit
|
||||
@ -65,6 +64,7 @@ while [ "${1}" != "" ]; do
|
||||
;;
|
||||
--check-requirements)
|
||||
echo "Checking if required softwares are available on this system..."
|
||||
if [ $DIST = "Ubuntu" ]; then
|
||||
check_ubuntu git
|
||||
check_ubuntu curl
|
||||
check_ubuntu debhelper
|
||||
@ -72,10 +72,13 @@ while [ "${1}" != "" ]; do
|
||||
check_ubuntu gnupg
|
||||
check_ubuntu python
|
||||
echo -e "\nYou are advised to make sure you have the \"latest\" versions of the above packages installed."
|
||||
echo -e "\nYou can upgrade all your installed packages by:"
|
||||
echo -e "\tsudo apt-get update\n\tsudo apt-get upgrade"
|
||||
echo -e "\nor update only the required packages by:"
|
||||
echo -e "\tsudo apt-get update git curl debhelper devscripts gnupg python"
|
||||
echo -e "Update the required packages by:"
|
||||
echo -e " sudo apt-get update"
|
||||
echo -e " sudo apt-get install git curl debhelper devscripts gnupg python"
|
||||
exit
|
||||
elif [ ${OS} = "Cygwin" ]; then
|
||||
:
|
||||
fi
|
||||
|
||||
;;
|
||||
--current-dev-tarball)
|
||||
|
@ -4,10 +4,10 @@
|
||||
#
|
||||
# The Cling Interpreter
|
||||
#
|
||||
# tools/packaging/debian/debianize.sh: Script to produce Debian packages for
|
||||
# Ubuntu/Debian platforms.
|
||||
# Cling Packaging Tool (CPT)
|
||||
#
|
||||
# TODO: Add documentation here, or provide link to documentation
|
||||
# tools/packaging/debian/debianize.sh: Helper script to produce Debian packages
|
||||
# for Ubuntu/Debian platforms.
|
||||
#
|
||||
# Author: Anirudha Bose <ani07nov@gmail.com>
|
||||
#
|
||||
|
@ -4,7 +4,10 @@
|
||||
#
|
||||
# The Cling Interpreter
|
||||
#
|
||||
# tools/packaging/get_platform.sh: Script to detect host platform and OS
|
||||
# Cling Packaging Tool (CPT)
|
||||
#
|
||||
# tools/packaging/get_platform.sh: Helper script to get details of the host
|
||||
# platform and Operating System
|
||||
#
|
||||
# Author: Anirudha Bose <ani07nov@gmail.com>
|
||||
#
|
||||
@ -19,7 +22,7 @@
|
||||
|
||||
OS=$(uname -o)
|
||||
|
||||
if [ "$OS" = "Cygwin" ]; then
|
||||
if [ "${OS}" = "Cygwin" ]; then
|
||||
OS="Windows"
|
||||
elif [ "{$OS}" = "Darwin" ]; then
|
||||
OS="Mac OS"
|
||||
|
@ -4,10 +4,10 @@
|
||||
#
|
||||
# The Cling Interpreter
|
||||
#
|
||||
# tools/packaging/get_source.sh: Script to fetch sources of Cling and vendor
|
||||
# clones of LLVM and Clang
|
||||
# Cling Packaging Tool (CPT)
|
||||
#
|
||||
# TODO: Add documentation here, or provide link to documentation
|
||||
# tools/packaging/get_source.sh: Helper script to fetch sources of Cling and
|
||||
# vendor clones of LLVM and Clang from ROOT Projects git repository.
|
||||
#
|
||||
# Author: Anirudha Bose <ani07nov@gmail.com>
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user