commit a6e98d2c3dedb2459adfa5f55f0bc51ff61f8787 parent e3a91069e35cfed4a96953da4577890bacdcc205 Author: nil <nil@niliara.net> Date: Thu, 20 Nov 2025 20:00:55 +0000 properly indent and add style.css Diffstat:
| M | new.sh | | | 7 | +++++-- |
| M | remove.sh | | | 3 | ++- |
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/new.sh b/new.sh @@ -8,8 +8,10 @@ fi git init --bare $1 cp ~/_templates/post-receive /var/git/$1/hooks/ -echo "/var/git/$1/hooks/post-receive" | xargs sed -i "s|name=\"\"|name=\"$1\"|g" -echo "/var/git/update-index.sh" | xargs sed -i "s|> index.html|/var/git/$1/ > index.html|g" +echo "/var/git/$1/hooks/post-receive" | \ + xargs sed -i "s|name=\"\"|name=\"$1\"|g" +echo "/var/git/update-index.sh" | \ + xargs sed -i "s|> index.html|/var/git/$1/ > index.html|g" rm /var/git/$1/description echo "No description" > /var/git/$1/description @@ -17,3 +19,4 @@ echo "git://niliara.net/$1" > /var/git/$1/url mkdir /var/www/git/$1 ln -s /var/www/git/logo.png /var/www/git/$1/ +ln -s /var/www/git/style.css /var/www/git/$1/ diff --git a/remove.sh b/remove.sh @@ -11,7 +11,8 @@ if [ -z $selected ]; then exit 1 fi -echo "/var/git/update-index.sh" | xargs sed -i "s| /var/git/$selected/||g" +echo "/var/git/update-index.sh" | \ + xargs sed -i "s| /var/git/$selected/||g" rm -rf /var/www/git/$selected/ rm -rf /var/git/$selected/