Compare commits

...

2 Commits

Author SHA1 Message Date
Kabooshki 7e3f846617 changed readme 2024-09-10 13:47:16 +00:00
Kabooshki 85b96ef95b modified deb-upload to be able to upload an entire
directory as well
2024-09-10 13:46:27 +00:00
3 changed files with 23 additions and 4 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
keys.txt keys.txt
/upload

View File

@ -1,3 +1,7 @@
Package Upload Scripts Package Upload Scripts
for deb-upload, please place your api/login key on the first line of a file called "keys.txt" for deb-upload, please place your api/login key on the first line of a file called "keys.txt"
usage:
deb-upload <file or directory>
container-upload <image>

View File

@ -1,5 +1,19 @@
#!/bin/bash #!/bin/bash
key=$(sed -n 1p keys.txt) key=$(sed -n 1p keys.txt)
curl --user Archive:$key --upload-file $1 https://gitea.henriserverack.com/api/packages/Archive-Team/debian/pool/bullseye/main/upload
echo "Upload Complete" if [[ -f $1 ]]; then
curl --user Archive:$key --upload-file $1 https://gitea.henriserverack.com/api/packages/Archive-Team/debian/pool/bullseye/main/upload
echo "Upload Complete"
elif [[ -d $1 ]]; then
for file in "$1"/*; do
if [[ -f "$file" ]]; then
curl --user Archive:$key --upload-file $file https://gitea.henriserverack.com/api/packages/Archive-Team/debian/pool/bullseye/main/upload
echo "uploaded $file"
fi
if [[ -d "$file" ]]; then
iterate "$file"
echo "skipping over $file"
fi
done
fi