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 @ 254:f8f6e50d5c79

[sync] imported e4e9400..5fd794d from upstream commit 5fd794d1280cc60ce24c73cb6ca552274d628f8a Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sun Jun 4 23:49:41 2023 +0200 app-office/softmaker-office: version bump 2021.1064 commit a9f78aa008575f6d894a735d0992b1d897751509 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sun Jun 4 23:47:16 2023 +0200 app-office/softmaker-office: fixed typo commit 31d0d432a5cc3c0a5e62cb5274d163f81f96d5c5 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sun Jun 4 23:29:34 2023 +0200 app-office/softmaker-office: fix MIME installation
author Migration Sync <gentoo-overlay@megacoffee.net>
date Sun, 04 Jun 2023 22:00: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} $@