Skip to content

Commit 95caf9f

Browse files
committed
Added argument for target directory when extracting tar file
1 parent 1797e15 commit 95caf9f

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
volumes:
1515
- .:/usr/src/app
1616
command: >
17-
sh -c "./fetch_processing_jar.sh"
17+
sh -c "./fetch_processing_jar.sh /usr/src/app"
1818
1919
site-build:
2020
image: processing-py-site

‎fetch_processing_jar.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Define the target directory from the first script argument, default to current directory if not provided
4+
TARGET_DIR="${1:-.}"
5+
36
# Define global constants for URLs
47
URL_LINUX64="https://py.processing.org/processing.py-linux64.tgz"
58
URL_LINUX32="https://py.processing.org/processing.py-linux32.tgz"
@@ -43,4 +46,4 @@ if [ -z "$URL" ]; then
4346
fi
4447

4548
echo "Downloading Processing.py for $OS ($ARCH)"
46-
wget -O processing.py-archive "$URL" && tar -xvzf processing.py-archive -C /usr/src/app
49+
wget -O processing.py-archive "$URL" && tar -xvzf processing.py-archive -C "$TARGET_DIR"

‎netlify.toml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
[build]
2-
# Specify the build command you want to run
32
command = "bash -c './fetch_processing_jar.sh && python generator.py build --all --images'"
4-
# Specify the directory that Netlify should publish
53
publish = "generated"

0 commit comments

Comments
 (0)