#!/bin/bash -e set -e HERE=`pwd` ls laclin-build-uchromium.sh ls uchromium.wrapper hash go hash docker && hash dockerd hash runc && hash containerd echo `date` Start killall -w dockerd || true killall -w containerd || true docker >& /dev/null # This creates required files dockerd >& dockerd.log & sleep 1 NN=`ps ax | grep dockerd | grep -v grep | wc -l` if [ "@$NN" == "@0" ]; then echo "Error: dockerd isn't running" exit 1 fi BLDDIR=build-uchromium GITURL=https://github.com/ungoogled-software/\ ungoogled-chromium-portablelinux.git GITDIR=uchromium.git cd $HOME rm -fr $BLDDIR mkdir $BLDDIR cd $BLDDIR git clone --recurse-submodules $GITURL \ $GITDIR cd $GITDIR git submodule init && git submodule update bash scripts/docker-build.sh #--------------------------------------------------------------------- set -euo pipefail UGNAME="ungoogled-chromium" GITSUB="$UGNAME" IMGPKG="$UGNAME-trixie-slim:packager" RTDIR=`pwd` rm -fr $RTDIR/build/release/$UGNAME-*.tar.xz ls $RTDIR/docker || exit 1 docker buildx build --load -t \ "$IMGPKG" -f "$RTDIR/docker/package.Dockerfile" . [ -n "$(ls -A "$RTDIR/$GITSUB" 2>/dev/null || true)" ] \ || git -C "$RTDIR" submodule update --init --recursive UIDGID="$(id -u):$(id -g)" cd "$RTDIR" && docker run --rm -i \ -u "$UIDGID" \ -e APPIMAGE_EXTRACT_AND_RUN=1 \ -v "$RTDIR:/repo" \ "$IMGPKG" bash "/repo/scripts/package.sh" ls -l $RTDIR/build/release/$UGNAME-*.tar.xz PARDIR=/opt/uchromium rm -fr $PARDIR mkdir $PARDIR cd $PARDIR tar Jxf $RTDIR/build/release/$UGNAME-*.tar.xz mv ${UGNAME}* program WRAPPATH=$PARDIR/bin/uchromium mkdir bin cp -p $HERE/uchromium.wrapper \ $WRAPPATH chmod 755 $WRAPPATH ls -l $WRAPPATH cd /usr/bin/ ln -nsf /opt/uchromium/bin/uchromium . ln -nsf uchromium chrome cd / echo `date` Done