From cca78be83a941a35c4abcfc8dfa7209a1c9aa515 Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Fri, 4 Dec 2020 17:22:43 +0300 Subject: add fossil init script link --- .bashrc | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.bashrc b/.bashrc index 6f7d86f..fc0a23c 100644 --- a/.bashrc +++ b/.bashrc @@ -37,13 +37,26 @@ pacs() { --preview-window=:hidden --bind=space:toggle-preview) } -finit() { - fossil init $1.fossil && \ - chmod 664 $1.fossil && \ - fossil open $1.fossil --workdir $1 && \ - fossil user password $USER $PASSWD && \ - fossil remote-url https://$USER:$PASSWD@aaoth.ml/$1 && \ - rsync --perms $1.fossil $USER@aaoth.ml:/var/www/htdocs/aaoth.ml >/dev/null && \ - chmod 644 $1.fossil && \ - fossil ui -} +FOSSILS_HOME=$HOME/Documents/Fossils + +# fossil init script +# modified version of one taken from +# https://www.fossil-scm.org/home/doc/trunk/www/server/openbsd/fastcgi.md + +source $HOME/.local/bin/finit + +# real one is there, but because it has some +#personal information, i'll not include it, but it almost identical to +#following: +# +#finit() { +# FINIT_REPO=$FOSSILS_HOME/$1.fossil +# fossil init $FINIT_REPO && \ +# chmod 664 $FINIT_REPO && \ +# fossil open $FINIT_REPO --workdir $HOME/Documents/$1 && \ +# fossil user -R $FINIT_REPO password $USER $PASSWD && \ +# fossil remote-url -R $FINIT_REPO https://$USER@domain.tld/$1 && \ +# rsync --perms $FINIT_REPO $USER@domain.tld:/var/www/fossils/ \ +# >/dev/null && \ +# chmod 644 $FINIT_REPO +#} -- cgit v1.2.3