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 @ 242:1f4acc9d6241

[sync] imported 47eab67..e80c7f6 from upstream commit e80c7f6639205d919747245cce3c16ba1eb50368 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Feb 26 19:19:23 2022 +0100 media-video/blackmagic-media-express: removed old versions due to EAPI 5 commit d887f8f9c382d60dcaf1822f022c202a87a522dd Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Feb 26 19:17:56 2022 +0100 media-libs/blackmagic-desktop-video-sdk: removed old version due to EAPI 5 commit 46fdb32f2d4ad79f2baff1fbfd8141112f41f1d5 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Feb 26 19:16:16 2022 +0100 media-libs/blackmagic-desktop-video: removed old versions due to EAPI 5 commit f37a0b72f224f9155a00d129354c2a4653bfb7a2 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Feb 26 19:11:32 2022 +0100 deleted media-plugins/gimp-dds: EAPI 5, native support by GIMP 2.10
author Migration Sync <gentoo-overlay@megacoffee.net>
date Sat, 26 Feb 2022 18: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} $@