+ if [ "$SYNCTHING_INOTIFY_CMID" != "" ]; then
+ git checkout -q $SYNCTHING_INOTIFY_CMID || exit 1
+ version=${version}__patch_165
+ fi
+
+ # Workaround about "cannot find package "golang.org/x/sys/unix"
+ go get -u golang.org/x/sys/unix
+
+ # Workaround about "undefined: stream" error when cross-building MacOS
+ # https://github.com/rjeczalik/notify/issues/108
+ OPTS=""
+ [[ "$GOOS_STI" = "darwin" ]] && OPTS="-tags kqueue"
+
+ export GOPATH=$(cd ../../../.. && pwd)
+ go build ${OPTS} -v -i -ldflags "-w -X main.Version=$version" -o ${DESTDIR}/syncthing-inotify${EXT} || exit 1