Skip to content

Commit

Permalink
continue debugging workflow 23
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Sep 11, 2024
1 parent ea86e6e commit d399f35
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
15 changes: 14 additions & 1 deletion code/ws_client/requirements.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash

crossplatform_realpath_inner() {
python -c "import os; print(os.path.realpath('$1'))"
}

crossplatform_realpath() {
if [ -e "$1" ] || [ -L "$1" ]; then
crossplatform_realpath_inner "$1"
else
return 1
fi
}

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
Expand All @@ -13,7 +25,8 @@ python -m pip install --upgrade pip
# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
script_dir=$(dirname "$(crossplatform_realpath "${BASH_SOURCE[0]}")")
pip install -r ${script_dir}/requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
Expand Down
15 changes: 14 additions & 1 deletion code/ws_server/requirements.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash

crossplatform_realpath_inner() {
python -c "import os; print(os.path.realpath('$1'))"
}

crossplatform_realpath() {
if [ -e "$1" ] || [ -L "$1" ]; then
crossplatform_realpath_inner "$1"
else
return 1
fi
}

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
Expand All @@ -13,7 +25,8 @@ python -m pip install --upgrade pip
# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
script_dir=$(dirname "$(crossplatform_realpath "${BASH_SOURCE[0]}")")
pip install -r ${script_dir}/requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
Expand Down
15 changes: 14 additions & 1 deletion code/ws_server_with_reply/requirements.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash

crossplatform_realpath_inner() {
python -c "import os; print(os.path.realpath('$1'))"
}

crossplatform_realpath() {
if [ -e "$1" ] || [ -L "$1" ]; then
crossplatform_realpath_inner "$1"
else
return 1
fi
}

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
Expand All @@ -13,7 +25,8 @@ python -m pip install --upgrade pip
# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
script_dir=$(dirname "$(crossplatform_realpath "${BASH_SOURCE[0]}")")
pip install -r ${script_dir}/requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
Expand Down

0 comments on commit d399f35

Please sign in to comment.