We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

view app-misc/qutescoop/files/execution-wrapper.sh @ 247:3bbfc36612f3

[sync] imported 6cdbf01..4d14517 from upstream commit 4d1451762f196bc7ccdd0a352ca4ee5c04dac787 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Thu Mar 16 22:19:10 2023 +0100 media-libs/blackmagic-desktop-video-sdk-12.4.1: remove precompiled binaries by default commit ad0224e73a84749146584393e2c66636e74a6d4f Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Thu Mar 16 22:03:57 2023 +0100 updated BlackMagic ebuilds to Desktop Video 12.4.1 release
author Migration Sync <gentoo-overlay@megacoffee.net>
date Thu, 16 Mar 2023 21:30:02 +0000
parents 81f94c1dfb45
children
line wrap: on
line source

#!/bin/bash

echo "=== messages below come from a wrapper script installed by the ebuild ==="

destdir="${HOME}/.local/share/QuteScoop/QuteScoop"
templatedir="/usr/share/QuteScoop/data-template"
actualbin="/usr/share/QuteScoop/bin/QuteScoop"

function die {
	echo $@ >&2
	exit 1
}

[[ $EUID -ne 0 ]] || die "Refusing to run as root."

if [[ ! -e "$destdir" ]]; then
	echo "User is missing ${destdir}, copying from template ${templatedir} for first run..."

	[[ -d "$templatedir" ]] || die "QuteScoop data template directory ${templatedir} does not exist"
	
	mkdir -p "$destdir" || die "Failed to create destination directory ${destdir}"
	cp -R $templatedir/* "$destdir/" || die "Failed to copy from template ${templatedir} to destination ${destdir}"
	
	echo "Done."
fi

echo "=== messages below come from the original QuteScoop binary ==="

${actualbin} $@