1
Fork 0

Add import script and loopover to readme

This commit is contained in:
prescientmoon 2024-05-12 04:07:08 +02:00
parent b6de2eb08b
commit b76d7a0f07
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 28 additions and 0 deletions

27
import.sh Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Ensure three arguments are provided
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <language> <repo-name> <project-name>"
exit 1
fi
language=$1
repo="https://github.com/mateiadrielrafael/$2"
name=$3
# Ensure project with that name doesn't exist
if [ -d "$language/$name" ]; then
echo "Error: Project `$language/$name` already exists"
exit 1
fi
git fetch $repo
josh-filter ":prefix=$language/$name:unsign" FETCH_HEAD && git checkout FILTERED_HEAD
FILTER_BRANCH_SQUELCH_WARNING=1 \
git filter-branch --msg-filter "awk \"{print \\\"$language($name): \\\" \\\$0}\"" -f && \
git rebase --root --committer-date-is-author-date --signoff
hash=$(git hash)
git switch master
git merge --allow-unrelated $hash -m "Add `$language/$name`"

View file

@ -9,3 +9,4 @@
| [option](./option/) | Typescript implementation of the `Maybe` monad | | [option](./option/) | Typescript implementation of the `Maybe` monad |
| [pleix-frontend](./pleix-frontend/) | No idea what `pleix` was supposed to be, but this was essentially just a bunch of experiments with [lit-html](https://lit.dev/) | | [pleix-frontend](./pleix-frontend/) | No idea what `pleix` was supposed to be, but this was essentially just a bunch of experiments with [lit-html](https://lit.dev/) |
| [wave38](./wave38/) | Remake of [wave37](https://github.com/Mateiadrielrafael/wave37) I dropped super early into development. | | [wave38](./wave38/) | Remake of [wave37](https://github.com/Mateiadrielrafael/wave37) I dropped super early into development. |
| [loopover](./loopover/) | Implementation of the [loopover](https://loopover.xyz/) game logic |