Moulinette params

This commit is contained in:
Timo Schmidt 2023-03-28 15:03:40 +02:00
parent 3b4068fac9
commit 00cf30350f
1 changed files with 41 additions and 36 deletions

23
.bashrc
View File

@ -22,14 +22,14 @@ xset r rate 200 60
PATH="${PATH}:/nfs/homes/tischmid/.local/bin"
if [ -f ~/git-prompt.sh ]; then
. ~/git-prompt.sh
else
source <(curl --silent --location 'https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh')
fi
export GIT_PS1_SHOWDIRTYSTATE=1
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\][\w]\[\033[m\]\[\033[36m\]$(__git_ps1 " (%s)")\[\033[m\]\n$ '
# if [ ! -f ~/git-prompt.sh ] ; then
# curl --silent --location 'https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh' -o "~/git-prompt.sh"
# fi
#
# . ~/git-prompt.sh
# export GIT_PS1_SHOWDIRTYSTATE=1
# PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\][\w]\[\033[m\]\[\033[36m\]$(__git_ps1 " (%s)")\[\033[m\]\n$ '
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\][\w]\[\033[m\]\[\033[36m\]\[\033[m\]\n$ '
##-----------------------------------------------------
## synth-shell-greeter.sh
@ -97,6 +97,7 @@ timo_moulinette () {
# Set params
subject="${1}"
ex="${2}"
extras="${3}"
# Arghandle
if [ -z "${subject}" ] ; then
@ -199,11 +200,15 @@ timo_moulinette () {
fi
# Delete testfile
if [ "$(printf '%s' "${extras}" | sed 's/keep-test//g')" = "${extras}" ] ; then
rm -f -- "${download_file_name}"
fi
# Run binary
./${out_binary}
# rm -f -- "./${out_binary}"
if [ "${?}" = "0" ] && [ "$(printf '%s' "${extras}" | sed 's/keep-binary//g')" = "${extras}" ] ; then
rm -f -- "./${out_binary}"
fi
}
prev () {