e() { printf "$pre %s\n" "$*"; }
err() { echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: $0: $*" >&2; }
+
m cd /a/opt/go.git
-m git fetch
-vers=($(git tag | sort -Vr | grep -E '^go[0-9.]+$' | head))
-
-ver=${vers[0]}
-dl() {
- arch=$(dpkg --print-architecture)
- f=${ver}.linux-${arch}.tar.gz
-
- if [[ -e $f ]]; then
- timestamp=$(stat -c %Y $f)
- else
- timestamp=0
- fi
- m wget -N https://dl.google.com/go/$f || ret=$?
-}
-dl
-# 8 is return code for 404. for a new release, they might not have a binary out yet
-if [[ $ret == 8 ]]; then
- ver=${vers[1]}
+# don't check for updates on go more than once a day
+yesterday=$(( $(date +%s) - 60*60*24 ))
+if (( $(stat -c %Y FETCH_HEAD) < yesterday )); then
+ m git fetch
+ touch ~/.local/gofetch
+
+ vers=($(git tag | sort -Vr | grep -E '^go[0-9.]+$' | head))
+
+ ver=${vers[0]}
+ dl() {
+ arch=$(dpkg --print-architecture)
+ f=${ver}.linux-${arch}.tar.gz
+
+ if [[ -e $f ]]; then
+ timestamp=$(stat -c %Y $f)
+ else
+ timestamp=0
+ fi
+ m wget -N https://dl.google.com/go/$f || ret=$?
+ }
dl
-fi
+ # 8 is return code for 404. for a new release, they might not have a binary out yet
+ if [[ $ret == 8 ]]; then
+ ver=${vers[1]}
+ dl
+ fi
+
+ new_timestamp=$(stat -c %Y $f)
+ if [[ $timestamp != $new_timestamp || ! -e /usr/local/go/bin/go ]]; then
+ m sudo rm -rf /usr/local/go
+ m sudo tar -C /usr/local -xzf $f
+ fi
+
+ shopt -s nullglob
+ for x in go*.tar.gz; do
+ if [[ $x == $f ]]; then continue; fi
+ rm -fv $x
+ done
-new_timestamp=$(stat -c %Y $f)
-if [[ $timestamp != $new_timestamp || ! -e /usr/local/go/bin/go ]]; then
- m sudo rm -rf /usr/local/go
- m sudo tar -C /usr/local -xzf $f
fi
-shopt -s nullglob
-for x in go*.tar.gz; do
- if [[ $x == $f ]]; then continue; fi
- rm -fv $x
-done
go get -u mvdan.cc/fdroidcl
# pithosfly environment var is set in environment.sh
+if type -t pithos &>/dev/null; then
+ exit 0
+fi
+
+# this doesn't update automatically, so
+
p -y build-dep pithos
# other than pithos, based on failures
pi pithos gstreamer1.0-plugins-ugly intltool python3-mutagen
# from https://github.com/pithos/pithos/wiki/Installing-from-Source
pi meson python3-gi python3-gi-cairo \
- gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
- gir1.2-secret-1 libgdk-pixbuf2.0-dev libglib2.0-dev gnome-keyring appstream-util libappstream-glib-dev \
- python3-pylast gir1.2-appindicator3-0.1 gir1.2-keybinder-3.0 gnome-icon-theme-symbolic libxml2-utils gvfs
+ gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
+ gir1.2-secret-1 libgdk-pixbuf2.0-dev libglib2.0-dev gnome-keyring appstream-util libappstream-glib-dev \
+ python3-pylast gir1.2-appindicator3-0.1 gir1.2-keybinder-3.0 gnome-icon-theme-symbolic libxml2-utils gvfs
cd /a/opt/Pithosfly
./autogen.sh