Skip to content

Commit 59693f5

Browse files
committed
Simplify by extracting all the processing files to the target directory
1 parent 7208ad1 commit 59693f5

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

‎fetch_processing_jar.sh‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,15 @@ tar -xvzf processing.py-archive -C "$TEMP_DIR"
5757
# Find the top level processing.py-* directory
5858
TOP_LEVEL_DIR=$(find "$TEMP_DIR" -maxdepth 1 -type d -name 'processing.py-*' -print -quit)
5959

60+
# Copy all contents from the directory to the target directory
6061
if [ -n "$TOP_LEVEL_DIR" ]; then
61-
# Copy the processing-py.jar file to the target directory
62-
if [ -f "$TOP_LEVEL_DIR/processing-py.jar" ]; then
63-
cp "$TOP_LEVEL_DIR/processing-py.jar" "$TARGET_DIR/"
64-
fi
65-
66-
# Copy the contents of the libraries directory to $TARGET_DIR/libraries/processing
67-
if [ -d "$TOP_LEVEL_DIR/libraries/processing" ]; then
68-
# Ensure the target libraries/processing directory exists
69-
mkdir -p "$TARGET_DIR/libraries/processing"
70-
cp -r "$TOP_LEVEL_DIR/libraries/processing/." "$TARGET_DIR/libraries/processing/"
71-
fi
62+
cp -r "$TOP_LEVEL_DIR/"* "$TARGET_DIR/"
7263
else
7364
echo "The expected top level directory was not found in the archive."
7465
fi
7566

76-
# Clean up: Remove the temporary directory
77-
rm -rf "$TEMP_DIR"
67+
# Clean up: Remove the temporary directory and archive
68+
rm -rf "$TEMP_DIR" processing.py-archive
7869

79-
echo "Listing contents of $TARGET_DIR/libraries/processing:"
80-
ls -l "$TARGET_DIR/libraries/processing"
70+
echo "Listing contents of $TARGET_DIR:"
71+
ls -l "$TARGET_DIR"

0 commit comments

Comments
 (0)