@@ -55,30 +55,26 @@ TEMP_DIR=$(mktemp -d)
5555tar -xvzf processing.py-archive -C " $TEMP_DIR "
5656
5757# Find the top level processing.py-* directory
58- BASE_DIR =$( find " $TEMP_DIR " -maxdepth 1 -type d -name ' processing.py-*' -print -quit)
58+ TOP_LEVEL_DIR =$( find " $TEMP_DIR " -maxdepth 1 -type d -name ' processing.py-*' -print -quit)
5959
60- if [ -n " $BASE_DIR " ]; then
60+ if [ -n " $TOP_LEVEL_DIR " ]; then
6161 # Copy the processing-py.jar file to the target directory
62- if [ -f " $BASE_DIR /processing-py.jar" ]; then
63- cp " $BASE_DIR /processing-py.jar" " $TARGET_DIR /"
62+ if [ -f " $TOP_LEVEL_DIR /processing-py.jar" ]; then
63+ cp " $TOP_LEVEL_DIR /processing-py.jar" " $TARGET_DIR /"
6464 fi
6565
66- # Copy the contents of the libraries directory to $TARGET_DIR/libraries
67- if [ -d " $BASE_DIR /libraries/processing" ]; then
68- echo " Copying libraries from $BASE_DIR /libraries/processing/ to $TARGET_DIR /libraries/"
69- # Ensure the target libraries directory exists
70- mkdir -p " $TARGET_DIR /libraries"
71- cp -r " $BASE_DIR /libraries/processing/." " $TARGET_DIR /libraries/"
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/"
7271 fi
73- # log the contents of the $TARGET_DIR/libraries/ directory
74- echo " Listing contents of $TARGET_DIR /libraries/:"
75- ls -l " $TARGET_DIR /libraries/"
7672else
7773 echo " The expected top level directory was not found in the archive."
7874fi
7975
8076# Clean up: Remove the temporary directory
8177rm -rf " $TEMP_DIR "
8278
83- echo " Listing contents of $TARGET_DIR :"
84- ls -l " $TARGET_DIR "
79+ echo " Listing contents of $TARGET_DIR /libraries/processing :"
80+ ls -l " $TARGET_DIR /libraries/processing "
0 commit comments