From e9aa76e640ad768372d66008b94eb66acec3d647 Mon Sep 17 00:00:00 2001 From: czoczo Date: Thu, 27 Feb 2025 23:45:31 +0100 Subject: [PATCH] updated README.md --- README.md | 8 +------- getbb.sh | 13 +++++++++---- post-hook.sh | 8 -------- 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 post-hook.sh diff --git a/README.md b/README.md index f6bbcd3..3fbf1e0 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,5 @@ source ~/.bashrc ``` or just: ``` -curl https://cz0.cz/getbb.sh | sh && source ~/.bashrc +curl https://git.cz0.cz/getbb.sh | sh && source ~/.bashrc ``` -(but only if you really, really, _really_ trust me) - - - - -(in fact, no one really should... one of the many reasones being https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/ ) diff --git a/getbb.sh b/getbb.sh index c440ba9..ab4c16d 100644 --- a/getbb.sh +++ b/getbb.sh @@ -1,4 +1,9 @@ -#!/bin/bash -wget cz0.cz/betterbash-latest.tar.gz -q -O - | tar -xz --no-same-owner -C ~ -CMD='[ -f ~/.bshell/bb.sh ] && . ~/.bshell/bb.sh' -grep -q "$CMD" ~/.bashrc || echo "$CMD" >> ~/.bashrc +URL='https://git.cz0.cz/czoczo/BetterBash/raw/branch/master/.bshell' && \ +DIR=~/.bshell && \ +CMD='[ -f ~/.bshell/bb.sh ] && . ~/.bshell/bb.sh' && \ +mkdir -p $DIR && \ +wget $URL/bb.sh -O $DIR/bb.sh && \ +wget $URL/git-prompt.sh -O $DIR/git-prompt.sh && \ +grep -q "$CMD" ~/.bashrc || echo "$CMD" >> ~/.bashrc && \ +source ~/.bashrc + diff --git a/post-hook.sh b/post-hook.sh deleted file mode 100644 index f7456d2..0000000 --- a/post-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -rm -rf /data/tmp/BetterBash -cd /data/tmp/ -git clone http://127.0.0.1:3000/czoczo/BetterBash -cp /data/tmp/BetterBash/getbb.sh /wwwroot/getbb.sh -tar -czvf betterbash-latest.tar.gz -C /data/tmp/BetterBash/ . --exclude=".git" --exclude="README.md" --exclude="getbb.sh" --exclude="post-hook.sh" -rm /wwwroot/betterbash-latest.tar.gz -mv betterbash-latest.tar.gz /wwwroot/betterbash-latest.tar.gz