commit 6f320b62908816756b5f819a32097f4114123cc2
parent e08929533dbbd8e7e780b2a8bda0b72b8bc4c0eb
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date: Wed, 9 Aug 2017 02:24:32 +0200
shell/rc: portable-oriented setup
just . rc and that's it. shell/.profile only have this now.
Diffstat:
4 files changed, 30 insertions(+), 90 deletions(-)
diff --git a/README b/README
@@ -0,0 +1,29 @@
+= pkg ==========================================================================
+
+This is a set of package management scripts, associated dotfiles and
+scripts and a service management to get a whole software downloaded,
+compiled, installed, configured and running.
+
+It is really unstable (I change stuff all of the time), and undocumented
+(as it changes all of the time...).
+
+To try it: clone it in "$HOME":
+
+ cd $HOME
+ git clone http://github.com/josuah/pkg
+ . "$HOME/pkg/rc" # this sets PATH
+
+Then:
+
+ pkg-configure <package> # to link the dotfiles
+ pkg-tar <package> # to download a package in ~/src
+ pkg-build <package> # to compile it in ~/opt
+ pkg-install <package> # to symlink it to ~/{bin,lib,etc,...}
+
+And you are ready to use the program. If it is a service (package with
+a start script), you can also stat it:
+
+ pkg-service start <package>
+ pkg-service status <package>
+ pkg-service restart <package>
+ pkg-service stop <package>
diff --git a/libbearssl/bin/bot b/libbearssl/bin/bot
@@ -1,69 +0,0 @@
-DESC='a small git that prints bot status'
-<<<<<<< HEAD
-<<<<<<< HEAD
-HOST=unix.chat
-CHAN=#commits
-NICK=${0##*/}
-PASS=$PASS
-
-[ -p in ] || mkfifo in
-
-tail -f in | tee /dev/stderr | brssl client "$HOST:6697" |
-while IFS='' read -r line
-do
- case "$line" in
- ('PING :'*)
- printf '%s\n' "$line"
- sleep 1
- printf 'PONG%s\n' "${line#PING}" > in
- printf 'PONG%s\n' "${line#PING}"
-=======
-NICK=giitboot #${0##*/}
-CHAN='#commits'
-=======
-NICK=bot #${0##*/}
-CHAN=#commits
-HOST=unix.chat
->>>>>>> libbearssl/bin/bot: be more flexible on the data
-
-printf 'NickServ password: '; IFS='' read -r password
-
-[ -p in ] || mkfifo in
-
-while : # keep trying to connect
-do
- printf 'USER %s +i * :%s\n' "$NICK" "$DESC"
- printf 'NICK %s\n' "$NICK"
- printf 'PRIVMSG NickServ :IDENTIFY %s\n' "$password"
- printf 'JOIN %s\n' "$CHAN"
-
- tail -f in | while IFS='' read -r line
- do
- printf 'PRIVMSG %s :%s\n' "$CHAN" "$line"
- done
-done | brssl client "$HOST:6697" | while IFS='' read -r line
-do
- case "$line" in
- ('PING :'*)
- printf 'PONG :%s\n' "${line#PING :}" > in
->>>>>>> libbearssl/bin/bot: stupid bot that still does stuff
- ;;
- (*)
- printf '%s\n' "$line"
- ;;
- esac
-<<<<<<< HEAD
-done &
-
-sleep 10
-printf 'USER %s +i * :%s\n' "$NICK" "$DESC" > in
-printf 'NICK %s\n' "$NICK" > in
-sleep 10
-printf 'PRIVMSG NickServ :IDENTIFY %s\n' "$PASS" > in
-sleep 10
-printf 'JOIN %s\n' "$CHAN" > in
-
-wait
-=======
-done
->>>>>>> libbearssl/bin/bot: stupid bot that still does stuff
diff --git a/shell/.profile b/rc
diff --git a/shell/.profile b/shell/.profile
@@ -1,21 +1 @@
-export ROOT="$HOME"
-
-export PKG="$ROOT/pkg"
-export OPT="$ROOT/opt"
-export SRC="$ROOT/src"
-export GIT="$ROOT/git"
-export VAR="$ROOT/var"
-
-export PATH="$ROOT/bin:$PATH"
-export MANPATH="$ROOT/man:$MANPATH"
-export C_INCLUDE_PATH="$ROOT/include"
-export LIBRARY_PATH="$ROOT/.local/lib"
-export LD_LIBRARY_PATH="$ROOT/lib:$LD_LIBRARY_PATH"
-
-for bin in "$PKG"/*/bin
-do [ -d "$bin" ] && export PATH="$bin:$PATH"
-done
-
-for profile in "$PKG"/*/profile
-do [ -f "$profile" ] && . "$profile"
-done
+. "$HOME/pkg/rc"