aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-02-18 00:29:36 -0500
committerelioat <elioat@tilde.institute>2023-02-18 00:29:36 -0500
commit49bc70ebaff08d65340391d6b6675b60d6eca3c9 (patch)
treef3864a9be13f7ff5fada964db713e454fff82663 /bash
parentb54b74ad96e9d1854f9bac72cb129908f5261a37 (diff)
downloadtour-49bc70ebaff08d65340391d6b6675b60d6eca3c9.tar.gz
*
Diffstat (limited to 'bash')
-rwxr-xr-xbash/moon-maker/mm23
1 files changed, 11 insertions, 12 deletions
diff --git a/bash/moon-maker/mm b/bash/moon-maker/mm
index b008e90..b4bfb03 100755
--- a/bash/moon-maker/mm
+++ b/bash/moon-maker/mm
@@ -12,14 +12,14 @@ EDITOR="subl"
add-moons () {
if [[ -d ".moons" ]]; then
touch ".moons/$1"
- echo -e "A new moon is orbiting $2"
+ echo -e "a new moon is orbiting $2"
else
path=$(pwd)
while [ -n "$path" ]; do
path=${path%/*}
if [ -d "$path/.moons" ]; then
touch "$path/.moons/$1"
- echo -e "A new moon is orbiting $2"
+ echo -e "a new moon is orbiting $2"
return
fi
done
@@ -29,14 +29,14 @@ add-moons () {
delete-moon-by-moon-id () {
if [[ -d ".moons" ]]; then
rm .moons/*"$1"*
- echo -e "The moon $1 has been removed"
+ echo -e "the moon $1 has been removed"
else
path=$(pwd)
while [ -n "$path" ]; do
path=${path%/*}
if [ -d "$path/.moons" ]; then
rm "$path/.moons/"*"$1"*
- echo -e "The moon $1 has been removed"
+ echo -e "the moon $1 has been removed"
return
fi
done
@@ -46,14 +46,14 @@ delete-moon-by-moon-id () {
delete-moons-by-planet () {
if [[ -d ".moons" ]]; then
rm .moons/"$1"*
- echo -e "All moons orbiting $1 have been deleted."
+ echo -e "all moons orbiting $1 have been deleted."
else
path=$(pwd)
while [ -n "$path" ]; do
path=${path%/*}
if [ -d "$path/.moons" ]; then
rm "$path/.moons/$1"*
- echo -e "All moons orbiting $1 have been deleted."
+ echo -e "all moons orbiting $1 have been deleted."
return
fi
done
@@ -99,14 +99,14 @@ list-moons-by-planet () {
rename-planet-and-orbiting-moons () {
if [[ -d ".moons" ]]; then
for file in .moons/"$1"* ; do mv "$file" "${file//$1/$2}" ; done
- echo -e "Planets and moons have been renamed from $1 to $2"
+ echo -e "planets and moons have been renamed from $1 to $2"
else
path=$(pwd)
while [ -n "$path" ]; do
path=${path%/*}
if [ -d "$path/.moons" ]; then
for file in "$path/.moons/$1"* ; do mv "$file" "${file//$1/$2}" ; done
- echo -e "Planets and moons have been renamed from $1 to $2"
+ echo -e "planets and moons have been renamed from $1 to $2"
return
fi
done
@@ -120,6 +120,8 @@ help_text() {
echo '
Moon Maker
+ ⋆⁺₊⋆ ☾⋆⁺₊⋆
+
mm, is a small program that lets you add orbiting moons to planet files.
A planet file is one that you care about -- probably an actual file in your project.
@@ -144,10 +146,7 @@ elif [[ "${1-}" =~ ^-*i(nit)?$ ]]; then
mkdir ".moons"
echo -e "moons initialized"
else
- echo -e "
- a moon maker directory already exists
- so you can't add another one here.
- "
+ echo -e "there's already a moon directory here"
fi
exit
elif [[ "${1-}" =~ ^-*o(pen)?$ ]]; then