File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ vars :
4+ CAMERA_STREAMER : ayufan/camera-streamer
5+
6+ tasks :
7+ update-camera-streamer :
8+ cmds :
9+ - |
10+ TAG="{{.TAG}}"
11+ if [ "$TAG" == "latest" ]; then
12+ TAG=$(curl -sL https://api.github.com/repos/{{.CAMERA_STREAMER}}/releases/latest | jq -r '.tag_name')
13+ fi
14+
15+ URL="https://api.github.com/repos/{{.CAMERA_STREAMER}}/releases/tags/$TAG"
16+ echo "Fetching release information for $TAG from $URL"
17+
18+ for url in $(curl -sL $URL | jq -r '.assets[].browser_download_url' | grep "camera-streamer-raspi.*\.deb");
19+ do
20+ echo $url
21+ name=$(echo $url | cut -d/ -f9)
22+ distro=$(echo $name | rev | cut -d. -f2 | rev | cut -d_ -f1)
23+ arch=$(echo $name | rev | cut -d. -f2 | rev | cut -d_ -f2)
24+
25+ dir=pool/$distro/rpi/camera-streamer-raspi
26+ if [ -d $dir ]; then
27+ echo "Downloading $url to $name..."
28+ pushd $dir
29+ curl -LJ "$url" > "$name"
30+ popd
31+ fi
32+ done
33+ vars :
34+ TAG : ' {{.TAG|default "latest"}}'
You can’t perform that action at this time.
0 commit comments