modified deb-upload to be able to upload an entire
directory as well
This commit is contained in:
parent
f52c16dfa1
commit
85b96ef95b
|
@ -1 +1,2 @@
|
||||||
keys.txt
|
keys.txt
|
||||||
|
/upload
|
18
deb-upload
18
deb-upload
|
@ -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
|
Loading…
Reference in New Issue