summaryrefslogtreecommitdiffstats
path: root/skripti
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-01-07 20:06:43 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2024-01-07 20:06:43 +0100
commit8ba3154e898260adedafde481c72c425324226f5 (patch)
tree6489cb1e4add9bfc276665f5335d22a241149d28 /skripti
parentdn10 (diff)
downloadr-8ba3154e898260adedafde481c72c425324226f5.tar
r-8ba3154e898260adedafde481c72c425324226f5.tar.gz
r-8ba3154e898260adedafde481c72c425324226f5.tar.bz2
r-8ba3154e898260adedafde481c72c425324226f5.tar.lz
r-8ba3154e898260adedafde481c72c425324226f5.tar.xz
r-8ba3154e898260adedafde481c72c425324226f5.tar.zst
r-8ba3154e898260adedafde481c72c425324226f5.zip
Diffstat (limited to 'skripti')
-rwxr-xr-xskripti/namesti.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/skripti/namesti.sh b/skripti/namesti.sh
new file mode 100755
index 0000000..88253bf
--- /dev/null
+++ b/skripti/namesti.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -xeuo pipefail
+sendmail anton@sijanec.eu <<EOF
+Subject: $DOAS_USER zagnal $0 $@
+
+Uporabnik $DOAS_USER na računalniku `hostname` je pravkar zahteval poganjanje programa $0 z argumenti $@ kot root. Ugodil bom njegovi zahtevi.
+EOF
+p=`grep -Eo '[a-zA-Z0-9+][a-zA-Z0-9_+.-]*[a-zA-Z0-9_+./]*' <<<$1 | head -n1`
+echo Začel bom nameščanje $p.
+echo | emerge $p