aboutgitcodelistschat:MatrixIRC
path: root/web/demo_connect.sh
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-06-09 11:07:25 +0200
committerAlice Frosi <afrosi@redhat.com>2023-06-09 11:08:58 +0200
commit65b5eacaa500e702b982c6848e1ffc18094bc9a9 (patch)
tree1b10a474d914cafbc59c02b64927f59f2a5139aa /web/demo_connect.sh
parentf1f136577a52b1588da5f74683f41d14df410300 (diff)
downloadseitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar.gz
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar.bz2
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar.lz
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar.xz
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.tar.zst
seitan-65b5eacaa500e702b982c6848e1ffc18094bc9a9.zip
demo: with mknod and podman
Splited common functions in web/common.sh and created new script for mknod demo. The demo uses the mount namespace of the caller. Additionally, this removes extra commented lines in demo/mknod.hjson.
Diffstat (limited to 'web/demo_connect.sh')
-rwxr-xr-xweb/demo_connect.sh76
1 files changed, 1 insertions, 75 deletions
diff --git a/web/demo_connect.sh b/web/demo_connect.sh
index ee6ffb0..0d27022 100755
--- a/web/demo_connect.sh
+++ b/web/demo_connect.sh
@@ -8,32 +8,13 @@
# Author: Stefano Brivio <sbrivio@redhat.com>
# Alice Frosi <afrosi@redhat.com>
-SEITAN_DIR=$(pwd)
SESSION=demo
VIDEO=seitan-connect
PSEITAN=1
PEATER=2
PSERVER=3
-setup_common() {
- tmux new-session -d -s $SESSION
- tmux send-keys -t $SESSION 'PS1="$ "'
- tmux send-keys -t $SESSION C-m
- tmux send-keys -t $SESSION clear
- tmux send-keys -t $SESSION C-m
-
- tmux set -t $SESSION window-status-format '#W'
- tmux set -t $SESSION window-status-current-format '#W'
- tmux set -t $SESSION status-left ''
- tmux set -t $SESSION window-status-separator ''
-
- tmux set -t $SESSION window-status-style 'bg=colour1 fg=colour15 bold'
- tmux set -t $SESSION status-right ''
- tmux set -t $SESSION status-style 'bg=colour1 fg=colour15 bold'
- tmux set -t $SESSION status-right-style 'bg=colour1 fg=colour15 bold'
- tmux send-keys -t $SESSION "cd ${SEITAN_DIR}" ENTER
- sleep 1
-}
+source web/common.sh
split_panes() {
tmux split-window -h
@@ -80,61 +61,6 @@ SCRIPT_seitan='
./seitan -p $(pgrep seitan-eater) -i demo/connect.gluten
'
-cmd_write() {
- __str="${@}"
- while [ -n "${__str}" ]; do
- __rem="${__str#?}"
- __first="${__str%"$__rem"}"
- if [ "${__first}" = ";" ]; then
- tmux send-keys -t $SESSION -l '\;'
- else
- tmux send-keys -t $SESSION -l "${__first}"
- fi
- sleep 0.05 || :
- __str="${__rem}"
- done
- sleep 2
- tmux send-keys -t $SESSION "C-m"
-}
-
-script() {
- IFS='
-'
- for line in $(eval printf '%s\\\n' \$SCRIPT_${1}); do
- unset IFS
- case ${line} in
- "@") tmux send-keys -t $SESSION C-m ;;
- "#"*) sleep ${#line} ;;
- *) cmd_write "${line}" ;;
- esac
- IFS='
-'
- done
- unset IFS
-}
-
-wait_seitan_exit() {
- while [ "$(pgrep seitan)" != "" ] ; do sleep 1; done
-}
-
-clear_panes() {
- wait_seitan_exit
- panes=$(tmux list-panes |awk '{ print $1 }' | sed 's/://')
- for p in $panes
- do
- tmux select-pane -t $p
- tmux send-keys -t $SESSION clear
- tmux send-keys -t $SESSION C-m
- done
- sleep 1
-}
-
-teardown_common() {
- sleep 5
- tmux kill-session -t $SESSION
- sleep 5
-}
-
printf '\e[8;22;80t'
setup_common