Files
truecharts/containers/tools/scarf.sh
T
2024-10-07 14:27:10 +02:00

23 lines
1.0 KiB
Bash
Executable File

PLAIN='jackett'
ajson="Accept:application/json"
credentials="Authorization: Bearer ${1}"
CT="Content-Type:application/json"
data='{"name":"truecharts/'${PLAIN}'","backendUrl":"https://ghcr.io/truecharts/'${PLAIN}'","longDescription":"","shortDescription":"example description","website":"https://truecharts.org","libraryType":"docker","publicUrl":"https://tccr.io/truecharts/'${PLAIN}'"}'
url="https://scarf.sh/api/v1/packages"
curl --header "$ajson" --header "$credentials" --data "$data" --header "$CT" "$url"
for group in apps dev mirror base; do
for i in ${group}/*; do
PLAIN=$( echo $i | cut -d'/' -f2 )
data='{"name":"truecharts/'${PLAIN}'","backendUrl":"https://ghcr.io/truecharts/'${PLAIN}'","longDescription":"","shortDescription":"example description","website":"https://truecharts.org","libraryType":"docker","publicUrl":"https://tccr.io/truecharts/'${PLAIN}'"}'
url="https://scarf.sh/api/v1/packages"
curl --header "$ajson" --header "$credentials" --data "$data" --header "$CT" "$url"
done
done