From d9aa32b40a7f8d006fbdec884debb3e555d15cbb Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 22 Oct 2019 20:48:03 +0100 Subject: [PATCH] Remove unused shell scripts Signed-off-by: Yuxuan Shui --- functions.sh | 51 --------------------------------------------- make-release.sh | 26 ----------------------- tests/make-tests.sh | 16 -------------- 3 files changed, 93 deletions(-) delete mode 100755 functions.sh delete mode 100755 make-release.sh delete mode 100755 tests/make-tests.sh diff --git a/functions.sh b/functions.sh deleted file mode 100755 index 7d81beb..0000000 --- a/functions.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# Shared functions for various supporting scripts of compton -# Mostly copied from Gentoo gentoo-functions - -GOOD=$'\e[32;01m' -WARN=$'\e[33;01m' -BAD=$'\e[31;01m' -HILITE=$'\e[36;01m' -BRACKET=$'\e[34;01m' -NORMAL=$'\e[0m' - -# @FUNCTION: eerror -# @USAGE: [message] -# @DESCRIPTION: -# Show an error message. -eerror() { - echo -e "$@" | while read -r ; do - echo " $BAD*$NORMAL $REPLY" >&2 - done - return 0 -} - -# @FUNCTION: einfo -# @USAGE: [message] -# @DESCRIPTION: -# Show a message. -einfo() { - echo -e "$@" | while read -r ; do - echo " $GOOD*$NORMAL $REPLY" - done - return 0 -} - -# @FUNCTION: die -# @USAGE: -# @DESCRIPTION: -# Print the call stack and the working directory, then quit the shell. -die() { - eerror "Call stack:" - (( n = ${#FUNCNAME[@]} - 1 )) - while (( n > 0 )); do - funcname=${FUNCNAME[$((n - 1))]} - sourcefile=$(basename ${BASH_SOURCE[${n}]}) - lineno=${BASH_LINENO[$((n - 1))]} - eerror " ${sourcefile}:${lineno} - Called ${funcname}()" - (( n-- )) - done - eerror "Working directory: '$(pwd)'" - exit 1 -} diff --git a/make-release.sh b/make-release.sh deleted file mode 100755 index 535cf92..0000000 --- a/make-release.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Make a release source tarball containing pre-built documentation - -BASE_DIR=$(dirname "$0") -. "${BASE_DIR}/functions.sh" - -main() { - TMP=/tmp - mkdir -p "${TMP}" - - VER="$(make version)" - P="compton-${VER}" - git archive --format=tar -o "${TMP}/${P}.tar" --prefix="${P}/" HEAD || die - cd "${TMP}" || die - tar xf "${TMP}/${P}.tar" || die - sed -i "s/\(COMPTON_VERSION ?=\).*/\1 ${VER}/" "${P}/Makefile" || die - cd "${P}" || die - make docs || die - cd .. || die - tar cJf "${P}.tar.xz" "${P}" || die - rm -r "${P}" "${P}.tar" || die - einfo Archive is now on $(realpath ${P}.tar.xz) -} - -main diff --git a/tests/make-tests.sh b/tests/make-tests.sh deleted file mode 100755 index 06700a0..0000000 --- a/tests/make-tests.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Test script for GNU make build - -BASE_DIR=$(dirname "$0")/.. -. "${BASE_DIR}/functions.sh" - -OPTIONS=( NO_XINERAMA NO_LIBCONFIG NO_REGEX_PCRE NO_REGEX_PCRE_JIT - NO_VSYNC_DRM NO_VSYNC_OPENGL NO_VSYNC_OPENGL_GLSL NO_VSYNC_OPENGL_FBO - NO_VSYNC_OPENGL_VBO NO_DBUS NO_XSYNC NO_C2 ) - -for o in "${OPTIONS[@]}"; do - einfo Building with $o - make "${o}=1" -B "${@}" || die - einfo Build completed. -done