From d67faef94516aaf240e61483eb2d5cb7fb4d338a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Choch=C3=B3=C5=82?= Date: Tue, 30 Oct 2018 16:35:03 +0100 Subject: [PATCH] changed tar behaviour considering ownership, updated git hook, updated instruction in README.md --- README.md | 2 +- getbb.sh | 2 +- post-hook.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1c1ad1f..113ea8b 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@ ## install: ``` wget https://cz0.cz/getbb.sh -chmod +x getbs.sh && ./getbs.sh +bash getbb.sh ``` diff --git a/getbb.sh b/getbb.sh index 0d41e96..c440ba9 100644 --- a/getbb.sh +++ b/getbb.sh @@ -1,4 +1,4 @@ #!/bin/bash -wget cz0.cz/betterbash-latest.tar.gz -q -O - | tar -xz -C ~ +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 diff --git a/post-hook.sh b/post-hook.sh index a4b7a29..f7456d2 100644 --- a/post-hook.sh +++ b/post-hook.sh @@ -1,8 +1,8 @@ #!/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"" -rm -rf /data/tmp/BetterShell +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