summaryrefslogtreecommitdiffhomepage
path: root/once/install.sh
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-11-02 23:33:46 +0000
committermidipix <writeonce@midipix.org>2021-11-02 23:33:46 +0000
commit76d736e615b2277edee59888cc1ad69cefba5ab2 (patch)
tree2e74dd3c3e331ac6abbfda3b9701838b56987f98 /once/install.sh
parentfe0e58be155e4fea91fff3f3d2fddf3655423619 (diff)
downloadmpackage-76d736e615b2277edee59888cc1ad69cefba5ab2.tar.bz2
mpackage-76d736e615b2277edee59888cc1ad69cefba5ab2.tar.xz
once/install.sh: added --output= support for diverting stdout & stderr output.
Diffstat (limited to 'once/install.sh')
-rwxr-xr-xonce/install.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/once/install.sh b/once/install.sh
index 3706c57..cbdd52b 100755
--- a/once/install.sh
+++ b/once/install.sh
@@ -1,5 +1,14 @@
#!/bin/sh
+if [ $# = 1 ]; then
+ case "$1" in
+ --output=*)
+ exec 1>${1#*=}
+ exec 2>&1
+ ;;
+ esac
+fi
+
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
export HOME=/home/midipix