update-element-web: cope with rename

This commit is contained in:
Lucas 2020-12-21 12:18:38 +00:00
parent 1143e7ea10
commit b06b83aa4b

View File

@ -35,7 +35,7 @@ ver=$1
GH_BASE_URL=https://github.com/vector-im/element-web/releases/download GH_BASE_URL=https://github.com/vector-im/element-web/releases/download
cd "$ELEMENT_WEB_UI_DIR" || err "can't cd to web UI directory" cd "$ELEMENT_WEB_UI_DIR" || err "can't cd to web UI directory"
ftp -o - "$GH_BASE_URL/$ver/riot-$ver.tar.gz" | pax -rz || ftp -o - "$GH_BASE_URL/$ver/element-$ver.tar.gz" | pax -rz ||
err "can't fetch and extract release" err "can't fetch and extract release"
rm -f riot && ln -s "riot-$ver" riot || rm -f element && ln -s "element-$ver" element ||
err "can't point web UI directory to new release" err "can't point web UI directory to new release"