-tarball="syncthing-inotify-linux-amd64-v${SYNCTHING_INOTIFY_VERSION}.tar.gz" \
- && curl -sfSL "https://github.com/syncthing/syncthing-inotify/releases/download/v${SYNCTHING_INOTIFY_VERSION}/${tarball}" -O \
- && tar -xvf "${tarball}" syncthing-inotify \
- && mv syncthing-inotify ${DESTDIR}/syncthing-inotify
+ tarball="syncthing-inotify-${GOOS}-${GOARCH}-v${SYNCTHING_INOTIFY_VERSION}.${TB_EXT}"
+ curl -sfSL "https://github.com/syncthing/syncthing-inotify/releases/download/v${SYNCTHING_INOTIFY_VERSION}/${tarball}" -O || exit 1
+ if [ "${TB_EXT}" = "tar.gz" ]; then
+ tar -xvf "${tarball}" syncthing-inotify && mv syncthing-inotify ${DESTDIR}/syncthing-inotify || exit 1
+ else
+ unzip "$tarball" && mv syncthing-inotify.exe ${DESTDIR}/syncthing-inotify.exe || exit 1
+ fi