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 @ 250:37508d4f31c8

[sync] imported 18f98a6..d0858fb from upstream commit d0858fbd09faf50138d7ad3a4559ba1f3e2b930c Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Thu Apr 27 12:49:23 2023 +0200 kde-plasma/breeze: configurable outline (MR 292) via patch_outline Source: https://invent.kde.org/plasma/breeze/-/merge_requests/292 commit ef044cae13e73c5f9dd2d078a4879df3987cc69a Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Thu Apr 27 12:26:14 2023 +0200 kde-plasma/breeze-5.27.4 copied from main Gentoo repository
author Migration Sync <gentoo-overlay@megacoffee.net>
date Thu, 27 Apr 2023 11:00:03 +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} $@