Import skeleton
This commit is contained in:
commit
a71156ef59
10 changed files with 1253 additions and 0 deletions
20
scripts/.gitignore
vendored
Normal file
20
scripts/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
build.app.c
|
||||
build.app.c++
|
||||
build.app.c++-qt
|
||||
build.app.sh
|
||||
build.docs.doxygen
|
||||
build.docs.none
|
||||
build.files.none
|
||||
build.firmware.gpasm
|
||||
build.firmware.sdcc
|
||||
build.lib.c
|
||||
build.lib.c++
|
||||
build.make.none
|
||||
build.module.c
|
||||
build.tests.c
|
||||
build.tests.c++
|
||||
|
||||
config-printflags.sh
|
||||
module-create.sh
|
||||
release.sh
|
||||
version.sh
|
||||
67
scripts/functions.sh
Normal file
67
scripts/functions.sh
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
# leaptable-compiler/scripts/functions.sh
|
||||
#
|
||||
# (c)2009, Laurence Withers, <l@lwithers.me.uk>.
|
||||
# Released under the GNU GPLv3. See file COPYING or
|
||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||
#
|
||||
|
||||
# Common functions
|
||||
|
||||
|
||||
|
||||
# Print a success message
|
||||
print_success() {
|
||||
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
|
||||
then
|
||||
echo -n " - "
|
||||
else
|
||||
(echo -n -e " \E[32m* "; tput sgr0)
|
||||
fi
|
||||
echo $*
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Print a failure message
|
||||
print_failure() {
|
||||
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
|
||||
then
|
||||
echo -n " *** "
|
||||
else
|
||||
(echo -n -e " \E[31m*** "; tput sgr0)
|
||||
fi
|
||||
echo $*
|
||||
}
|
||||
|
||||
|
||||
|
||||
# This function carries out a command, but reports its failure if
|
||||
# necessary.
|
||||
do_cmd() {
|
||||
[ "${VERBOSE}" != "0" ] && echo "$@"
|
||||
"$@"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
print_failure "'$@' failed."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# This function carries out a command, but reports its failure if
|
||||
# necessary.
|
||||
do_cmd_redir() {
|
||||
DEST=$1
|
||||
shift
|
||||
[ "${VERBOSE}" != "0" ] && echo "$@ >> ${DEST}"
|
||||
"$@" >> ${DEST}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
print_failure "'$@' failed."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: expandtab:ts=4:sw=4
|
||||
64
scripts/paths
Normal file
64
scripts/paths
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# leaptable-compiler/scripts/paths
|
||||
#
|
||||
# (c)2009, Laurence Withers, <l@lwithers.me.uk>.
|
||||
# Released under the GNU GPLv3. See file COPYING or
|
||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||
#
|
||||
# Default path setup. Not meant for editing; use environment variables
|
||||
# to override values if needed.
|
||||
#
|
||||
|
||||
MY_PREFIX="${PREFIX}"
|
||||
[ "${MY_PREFIX}" == "/" ] && MY_PREFIX=""
|
||||
|
||||
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
|
||||
[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
|
||||
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
|
||||
|
||||
if [ -z "${INCLUDEDIR}" ]
|
||||
then
|
||||
case "${PREFIX}" in
|
||||
/) INCLUDEDIR="/usr/include" ;;
|
||||
*) INCLUDEDIR="${PREFIX}/include" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "${CONFIGDIR}" ]
|
||||
then
|
||||
case "${PREFIX}" in
|
||||
/ | /usr) CONFIGDIR="/etc" ;;
|
||||
/opt*) CONFIGDIR="/etc${PREFIX}" ;;
|
||||
*) CONFIGDIR="${PREFIX}/etc" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "${VARDIR}" ]
|
||||
then
|
||||
case "${PREFIX}" in
|
||||
/ | /usr | /usr/local) VARDIR="/var" ;;
|
||||
/opt*) VARDIR="/var${PREFIX}" ;;
|
||||
*) VARDIR="${PREFIX}/var" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "${SHAREDIR}" ]
|
||||
then
|
||||
case "${PREFIX}" in
|
||||
/) SHAREDIR="/usr/share" ;;
|
||||
*) SHAREDIR="${PREFIX}/share" ;;
|
||||
esac
|
||||
fi
|
||||
[ -z "${DOCSDIR}" ] && DOCSDIR="${SHAREDIR}/doc"
|
||||
|
||||
if [ -z "${SRVDIR}" ]
|
||||
then
|
||||
case "${PREFIX}" in
|
||||
/ | /usr | /usr/local) SRVDIR="/srv" ;;
|
||||
*) SRVDIR="${PREFIX}/srv" ;;
|
||||
esac
|
||||
fi
|
||||
[ -z "${WEBDIR}" ] && WEBDIR="${SRVDIR}/http"
|
||||
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
Loading…
Add table
Add a link
Reference in a new issue