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 @ 246:b4f83f7a0863

[sync] imported 7a7850a..6cdbf01 from upstream commit 6cdbf01e21f13976b612600d39df8a6d169ce8db Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Mon Jan 16 19:44:38 2023 +0100 media-gfx/trimage: added patch from upstream pull request 81 to fix "Quit" not working on tray icon commit e445d2bd579e1d32f0b322265b042bcdae128e07 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Mon Jan 16 19:38:28 2023 +0100 media-gfx/trimage: patch to remove deprecated .desktop category commit 6d72181841d4f0599637b27b867ce0e8c24461e4 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Mon Jan 16 19:28:09 2023 +0100 media-gfx/trimage: EAPI 8, updated PYTHON_COMPAT, propagate Python USE flag to PyQt5
author Migration Sync <gentoo-overlay@megacoffee.net>
date Mon, 16 Jan 2023 19:00:04 +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} $@