mirror of
https://github.com/rxrbln/t2sde.git
synced 2025-05-09 04:31:26 +08:00
120 lines
3.3 KiB
Bash
Executable File
120 lines
3.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# T2 SDE: scripts/Check-System
|
|
# Copyright (C) 2004 - 2005 The T2 SDE Project
|
|
# Copyright (C) 1998 - 2003 ROCK Linux Project
|
|
#
|
|
# More information can be found in the files COPYING and README.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
# GNU General Public License can be found in the file COPYING.
|
|
# --- T2-COPYRIGHT-NOTE-END ---
|
|
|
|
if [ "$1" ] ; then
|
|
echo "Usage: $0" ; exit 1
|
|
fi
|
|
|
|
found_error=0
|
|
|
|
if [ "`date '+%Y'`" -lt 1990 ] ; then
|
|
echo
|
|
echo "Paranoia Check: Your clock is not set!"
|
|
echo "Set you clock using the command: date MMDDhhmm[[CC]YY][.ss]"
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`grep '^/' < /proc/swaps`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: No active swap partition found!"
|
|
echo "That can cause the build scripts to hang your system!. Activate"
|
|
echo "a swap partition using the 'swapon' command and try again."
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`type -p curl`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'curl' not found!"
|
|
echo "The curl utility is needed for Downloading the package"
|
|
echo "source tars. Install the latest curl version."
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`type -p flex`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'Flex' not found!"
|
|
echo "The Flex utility is needed for scanning"
|
|
echo "Install the latest Flex version."
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`type -p m4`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'm4' not found!"
|
|
echo "The m4 utility is needed as a front"
|
|
echo "end for gcc. Install the latest m4 version."
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`type -p bzip2`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'bzip2' not found!"
|
|
echo "The bzip2 utility is needed for extracting the package"
|
|
echo "source tars. Install the latest bzip2 version."
|
|
found_error=1
|
|
fi
|
|
|
|
if [ -z "`type -p makeinfo`" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'makeinfo' not found!"
|
|
echo "The makeinfo program is needed for translating Texinfo"
|
|
echo "documents. Please make sure that a current version of the"
|
|
echo "texinfo package (including makeinfo) is installed on your system."
|
|
found_error=1
|
|
fi
|
|
|
|
case $BASH_VERSION in
|
|
2.05b*) ;;
|
|
3.0*) ;;
|
|
*) echo "The running bash version is not listed as supported version"
|
|
echo "You need to update 'bash' to at least version 2.05b."
|
|
found_error=1
|
|
esac
|
|
|
|
|
|
x="`mktemp -p /tmp 2> /dev/null`"
|
|
if [ -z "$x" -o ! -f "$x" ] ; then
|
|
echo
|
|
echo "Paranoia Check: Program 'mktemp' not found or too old!"
|
|
echo "You need an 'mktemp' installed which does know about the -p"
|
|
echo "option. Install the latest mktemp version."
|
|
found_error=1
|
|
else
|
|
rm -f "$x"
|
|
fi
|
|
|
|
x="`mktemp`" ; touch $x
|
|
if [ -z "`type -p sed`" ] || ! sed -i s/a/b/ $x
|
|
then
|
|
echo
|
|
echo "Paranoia Check: Program 'sed' not found or too old!"
|
|
echo "You need a 'sed' installed which does know about the -i option"
|
|
echo "(GNU/sed since 2001-09-25). Install the latest sed version."
|
|
found_error=1
|
|
fi
|
|
rm -f $x 2> /dev/null
|
|
|
|
if [ $found_error -ne 0 ] ; then
|
|
echo
|
|
echo "Paranoia Check found errors -> not doing anything."
|
|
echo "You can disable the Paranoia Checks in the Config tool"
|
|
echo "on your own risk!"
|
|
echo
|
|
fi
|
|
|
|
exit $found_error
|