X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=144f0c62d1289b75ddbd96246e72a36019bcbc9f;hb=9d5638298349b859d69c95a88d3e6270fced62f9;hp=7c33bea3251ebbd08cea977f6b72dff156be36d2;hpb=386ec3bb9a0a35be10431d3da9fa21a1d9bc29e2;p=distro-setup diff --git a/brc2 b/brc2 index 7c33bea..144f0c6 100644 --- a/brc2 +++ b/brc2 @@ -119,21 +119,22 @@ bpush() { } lipush() { rsync $@ --delete-excluded -ahviSAXPH --specials --devices --delete --relative \ - --exclude-from=/p/c/li-rsync-excludes /a/bin /a/exe /a/h /a/c /p/c/machine_specific/li /a/opt/{emacs,emacs-debianstable,mu} root@li:/ + --exclude-from=/p/c/li-rsync-excludes /a/bin /a/exe /a/h /a/c /p/c/machine_specific/li /a/opt/{emacs,emacs-debianstable,mu} root@iankelling.org:/ + rsync -ahviSAXPH root@iankelling.org:/a/h/proposed-comments/ /a/h/proposed-comments } -lipushnoe() { +lipushnoe() { # noe = noemacs. for running faster. rsync $@ --delete-excluded -ahviSAXPH --specials --devices --delete --relative \ --exclude-from=/p/c/li-rsync-excludes /a/bin /a/exe /a/h /a/c /p/c/machine_specific/li root@li:/ } +#### begin bitcoin related things btc() { local f=/etc/bitcoin/bitcoin.conf # importprivkey will timeout if using the default of 15 mins. # upped it to 1 hour. bitcoin-cli -rpcclienttimeout=60000 -$(s grep rpcuser= $f) -$(s grep rpcpassword= $f) "$@" } - btcusd() { # $1 btc in usd local price price="$(curl -s https://api.coinbase.com/v2/prices/BTC-USD/spot | jq -r .data.amount)" @@ -160,6 +161,7 @@ satoshi() { # $1 satoshi in usd printf "$%.2f\n" "$(echo "scale=10; $price * $1"| bc -l)" fi } +#### end bitcoin related things @@ -227,7 +229,26 @@ debian_pick_mirror () { sudo apt-get update } - +dup() { + local ran_d + ran_d=false + case $PS1 in + *DISTRO-BEGIN*) + /b/ds/distro-begin || return $? + ran_d=true + ;;& + *DISTRO-END*) + /b/ds/distro-end || return $? + ran_d=true + ;;& + *CONFLINK*) + if ! $ran_d; then + conflink + fi + ;; + esac + system-status _ +} envload() { # load environment from a previous: export > file local file=${1:-$HOME/.${USER}_env}