Last active
August 17, 2023 15:07
-
-
Save RichardBronosky/89fe9b680e72242621c75f4cfcf356ef to your computer and use it in GitHub Desktop.
Imgur was down, so I created Imgist
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
#! /usr/bin/env bash | |
set -eu | |
_main(){ | |
input_file="$1" | |
file_path="$(realpath -s "$input_file")" | |
file_name="$(basename "$file_path")" | |
cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")" | |
cp "$file_path" ./ | |
git add "$file_name" | |
git commit -m "Add '$file_name'" | |
git push | |
} | |
_main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment