mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2025-04-10 20:48:36 +00:00
Add shared bash functions
This commit is contained in:
parent
6322697ac4
commit
7560da3834
2 changed files with 35 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -8,8 +8,5 @@ __pycache__
|
|||
# Database
|
||||
db/
|
||||
|
||||
# Server setup documentation
|
||||
server_setup.adoc
|
||||
|
||||
# Development
|
||||
.flaskenv
|
||||
|
|
35
scripts/shared.sh
Normal file
35
scripts/shared.sh
Normal 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
|
||||
}
|
Loading…
Add table
Reference in a new issue