aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-07 08:52:24 -0400
committerKylie McClain <kylie@somas.is>2020-07-07 09:33:53 -0400
commit5608842788d0ecb4c83bff8a61b9e2e32737a65d (patch)
tree7984414ce0d4d24362a91e386fcdd34a37b8cb65
parent0ce7a125a7f3ae56ab791546b705432520b4939a (diff)
downloadpraxis-5608842788d0ecb4c83bff8a61b9e2e32737a65d.tar.gz
praxis-5608842788d0ecb4c83bff8a61b9e2e32737a65d.tar.xz
praxis-5608842788d0ecb4c83bff8a61b9e2e32737a65d.zip
theory.sh: shorten function names
-rw-r--r--theory.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/theory.sh.in b/theory.sh.in
index 50d06be..7c0eb97 100644
--- a/theory.sh.in
+++ b/theory.sh.in
@@ -10,7 +10,7 @@ is_theory_dir() {
return 1
}
-is_repository_dir() {
+is_repo_dir() {
[ -d "${1}" ] || perror -d "'%s' is not a directory\n" "${1}"
[ -d "${1}"/packages ] && [ -d "${1}"/metadata ] &&
@@ -20,7 +20,7 @@ is_repository_dir() {
return 1
}
-is_package_dir() {
+is_pkg_dir() {
[ -d "${1}" ] || perror -d "'%s' is not a directory\n" "${1}"
basename "${1}" | grep -Eq "^[A-Za-z][A-Za-z0-9_+-]*#[a-z0-9\._-]+$" &&
@@ -30,8 +30,8 @@ is_package_dir() {
return 1
}
-is_library_dir() {
+is_lib_dir() {
[ -d "${1}" ] || perror -d "'%s' is not a directory\n" "${1}"
- ! is_package_dir "${1}" && is_theory_dir "${1}" && return 0
+ ! is_pkg_dir "${1}" && is_theory_dir "${1}" && return 0
return 1
}