megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
comparison app-misc/qutescoop/files/execution-wrapper.sh @ 235:81f94c1dfb45
[sync] imported e892980..8c3bfd0 from upstream
commit 8c3bfd0fb74253d0c499bc7df3d9407a9a98f870
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Sun Jan 31 20:16:50 2021 +0100
added app-misc/qutescoop
author | Migration Sync <gentoo-overlay@megacoffee.net> |
---|---|
date | Sun, 31 Jan 2021 19:30:02 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
234:c56b9e2d29d6 | 235:81f94c1dfb45 |
---|---|
1 #!/bin/bash | |
2 | |
3 echo "=== messages below come from a wrapper script installed by the ebuild ===" | |
4 | |
5 destdir="${HOME}/.local/share/QuteScoop/QuteScoop" | |
6 templatedir="/usr/share/QuteScoop/data-template" | |
7 actualbin="/usr/share/QuteScoop/bin/QuteScoop" | |
8 | |
9 function die { | |
10 echo $@ >&2 | |
11 exit 1 | |
12 } | |
13 | |
14 [[ $EUID -ne 0 ]] || die "Refusing to run as root." | |
15 | |
16 if [[ ! -e "$destdir" ]]; then | |
17 echo "User is missing ${destdir}, copying from template ${templatedir} for first run..." | |
18 | |
19 [[ -d "$templatedir" ]] || die "QuteScoop data template directory ${templatedir} does not exist" | |
20 | |
21 mkdir -p "$destdir" || die "Failed to create destination directory ${destdir}" | |
22 cp -R $templatedir/* "$destdir/" || die "Failed to copy from template ${templatedir} to destination ${destdir}" | |
23 | |
24 echo "Done." | |
25 fi | |
26 | |
27 echo "=== messages below come from the original QuteScoop binary ===" | |
28 | |
29 ${actualbin} $@ |