aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/installcheck.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-08-19 07:51:55 -0300
committerEuAndreh <eu@euandre.org>2021-08-19 08:24:01 -0300
commite9aff79d8cfe32b74d11162dda58b9ca062e1161 (patch)
treeeebc45bb2c6a784ecb5806fee6a5df7fca5bd042 /aux/workflow/installcheck.sh
parentTODOs.md: Add #task-bd6ebb44-a6f7-5e14-39df-64e8e7cfc21e (diff)
downloadgit-permalink-e9aff79d8cfe32b74d11162dda58b9ca062e1161.tar.gz
git-permalink-e9aff79d8cfe32b74d11162dda58b9ca062e1161.tar.xz
aux/workflow/repocheck.sh: Add, supersedes aux/workflow/installcheck.sh
Implements - #task-079946ed-7e58-3051-78d6-71ba12342aba - #task-4a7e02bd-ab82-c628-fa1c-02749c178936 - #task-db34da8d-bf61-43ae-b8f0-f2299834a937 - #task-a0644009-70d7-56ff-c595-ea39fe24dc2b
Diffstat (limited to 'aux/workflow/installcheck.sh')
-rwxr-xr-xaux/workflow/installcheck.sh61
1 files changed, 0 insertions, 61 deletions
diff --git a/aux/workflow/installcheck.sh b/aux/workflow/installcheck.sh
deleted file mode 100755
index 0aae391..0000000
--- a/aux/workflow/installcheck.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-set -eu
-
-while getopts 'p:x:l:f:u' flag; do
- case "$flag" in
- p)
- PREFIX="$OPTARG"
- ;;
- x)
- EXECUTABLES_EXPECTED="$OPTARG"
- ;;
- l)
- SYMLINKS_EXPECTED="$OPTARG"
- ;;
- f)
- FILES_EXPECTED="$OPTARG"
- ;;
- u)
- UNINSTALL=1
- ;;
- *)
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-if [ -n "${UNINSTALL:-}" ]; then
- if [ "$(find "$PREFIX" -type f | wc -l)" != 0 ]; then
- printf 'When uninstalling, left over files in the'
- printf 'PREFIX directory:\n'
- find "$PREFIX" -type f
- exit 1
- fi
- exit
-fi
-
-EXECUTABLES_ACTUAL="$(find "$PREFIX" -type f -perm -a=x | wc -l)"
-if [ "${EXECUTABLES_EXPECTED:-0}" != "$EXECUTABLES_ACTUAL" ]; then
- printf 'Expected %s executables, found %s:\n' \
- "$EXECUTABLES_EXPECTED" "$EXECUTABLES_ACTUAL" >&2
- find "$PREFIX" -type f -perm -a=x
- exit 1
-fi
-
-SYMLINKS_ACTUAL="$(find "$PREFIX" -type l | wc -l)"
-if [ "${SYMLINKS_EXPECTED:-0}" != "$SYMLINKS_ACTUAL" ]; then
- printf 'Expected %s symlinks, found %s:\n' \
- "$SYMLINKS_EXPECTED" "$SYMLINKS_ACTUAL" >&2
- find "$PREFIX" -type l
- exit 1
-fi
-
-FILES_ACTUAL="$(find "$PREFIX" -type f | wc -l)"
-if [ "${FILES_EXPECTED:-0}" != "$FILES_ACTUAL" ]; then
- printf 'Expected %s files, found %s:\n' \
- "$FILES_EXPECTED" "$FILES_ACTUAL" >&2
- find "$PREFIX" -type f
- exit 1
-fi