unlimited-storage

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7405d2b232f5e9dba1250916181bf797d239518a
parent 30a795bb1fa3607b42291d9d845477d23bdd7407
Author: Andrew Laack <andrew@laack.co>
Date:   Sun, 28 Sep 2025 19:46:53 -0500

Wrote basic shell script for creating and uploading to github.

Diffstat:
Dgithub/32bf1359ac92178c8909f0ef938257b477708aa0d78a5a15ad7c2d7919adf273 | 0
Agithub/backup.sh | 4++++
Mgithub/create.sh | 27++++++++++++++++++++++-----
Agithub/decrypt.sh | 3+++
4 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/github/32bf1359ac92178c8909f0ef938257b477708aa0d78a5a15ad7c2d7919adf273 b/github/32bf1359ac92178c8909f0ef938257b477708aa0d78a5a15ad7c2d7919adf273 diff --git a/github/backup.sh b/github/backup.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +tar -cvf /dev/shm/brgr.tar /backups/brgr +gpg -c /dev/shm/brgr.tar > /dev/shm/brgr.tar.gpg diff --git a/github/create.sh b/github/create.sh @@ -1,10 +1,27 @@ #!/bin/bash -NAME=$(echo /dev/random | sha256sum | awk '{print $1}') +if [ "$1" ]; then -gh repo create $NAME --private --clone + #split FILE -b 100m -mv $1 $NAME + FILE=$(realpath "$1") + BASENAME=$(basename "$FILE") -cd $NAME -git add . && git commit -m "Init" && git push --set-upstream origin master + NAME=$(head -c 32 /dev/urandom | sha256sum | awk '{print $1}') + + cp "$FILE" /tmp/ + + cd /tmp || exit 1 + gh repo create "$NAME" --private --clone + + mv "/tmp/$BASENAME" "/tmp/$NAME/" + cd "/tmp/$NAME" || exit 1 + + git add . + git commit -m "Init" + git push --set-upstream origin master + +else + echo "Usage: $0 <file-to-upload>" + exit 1 +fi diff --git a/github/decrypt.sh b/github/decrypt.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +gpg -d $1