-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/redeem.nuggit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
LocalCodeExecution | ||
WorkInProgress | ||
CommitmentIssues | ||
CommitMirInsAbendteuerland | ||
LocalCodeExecution | ||
Switcheridoo | ||
ShowMeMore | ||
MyFirstBranch | ||
LogCat | ||
AnnotateMeIfYouCan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
nuggit="$1" | ||
|
||
success() { | ||
echo "Success! What a nice nuggit for your collection! 🏅 $1 looks really good!" | ||
} | ||
|
||
|
||
if [ -z "$nuggit" ]; then | ||
echo "no nuggit passed in..." >&2 | ||
echo "Useage: \`$0 TestNuggit\`" >&2 | ||
else | ||
if [ "$nuggit" = TestNuggit ]; then | ||
echo "This is a test. You passed it! 👍" | ||
exit | ||
fi | ||
|
||
git cat-file -p "$(echo "'$nuggit' already redeemed" | git hash-object --stdin)" 2>/dev/null && exit | ||
git cat-file -p "$(echo "You tried '$nuggit' before. It still isn't a valid answer... 🙄" | git hash-object --stdin)" 2>/dev/null && exit 1 | ||
|
||
git cat-file -p "$(success "$nuggit" | git hash-object --stdin)" 2>/dev/null || { | ||
echo "Unfortunately that is not a valid nuggit :/ Try again!" >&2 | ||
echo "You tried '$nuggit' before. It still isn't a valid answer... 🙄" | git hash-object --stdin -w >/dev/null 2>&1 | ||
exit 1 | ||
} | ||
echo "'$nuggit' already redeemed" | git hash-object --stdin -w >/dev/null 2>&1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
. "$DOCDIR/redeem.nuggit" >/dev/null 2>&1 | ||
|
||
while read -r nuggit; do | ||
printf "%s \t" "$nuggit" | ||
success "$nuggit" | git hash-object --stdin -w | ||
done < "$DOCDIR/nuggits" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters