1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-09-17 18:31:15 +00:00

Add shared bash functions

This commit is contained in:
Mo 2022-04-20 02:15:57 +02:00
parent 6322697ac4
commit 7560da3834
2 changed files with 35 additions and 3 deletions

3
.gitignore vendored
View file

@ -8,8 +8,5 @@ __pycache__
# Database
db/
# Server setup documentation
server_setup.adoc
# Development
.flaskenv

35
scripts/shared.sh Normal file
View file

@ -0,0 +1,35 @@
#!/bin/bash
box() {
MESSAGE="$2$1"
SEPERATOR="==${MESSAGE//?/=}=="
echo
echo "$SEPERATOR"
echo "| $MESSAGE |"
echo "$SEPERATOR"
echo
}
step() {
CONTINUE_MESSAGE="-> Press ENTER to continue or Ctrl+C to interrupt the script <-"
UPPER_SEPERATOR="${CONTINUE_MESSAGE//?/_}"
echo
echo "$UPPER_SEPERATOR"
box "$1" "Next step: "
echo "$CONTINUE_MESSAGE"
read -s
echo
}
install_latest_pipx() {
pip install --user --upgrade pipx
}
poetry_install_latest() {
cd "$SDIR/.."
poetry install
}