File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Define global constants for URLs
4+ URL_LINUX64=" http://py.processing.org/processing.py-linux64.tgz"
5+ URL_LINUX32=" http://py.processing.org/processing.py-linux32.tgz"
6+ URL_MAC=" http://py.processing.org/processing.py-macosx.tgz"
7+ URL_WINDOWS64=" http://py.processing.org/processing.py-windows64.zip"
8+ URL_WINDOWS32=" http://py.processing.org/processing.py-windows32.zip"
9+
10+ # Detect the operating system
11+ OS=" unknown"
12+ case " $( uname -s) " in
13+ Linux* ) OS=" Linux" ;;
14+ Darwin* ) OS=" Mac" ;;
15+ CYGWIN* |MINGW* |MSYS* ) OS=" Windows" ;;
16+ * ) OS=" UNKNOWN" ;;
17+ esac
18+
19+ # Detect the architecture
20+ ARCH=$( uname -m)
21+ URL=" "
22+
23+ if [ " $OS " == " Linux" ]; then
24+ if [ " $ARCH " == " x86_64" ]; then
25+ URL=" $URL_LINUX64 "
26+ elif [ " $ARCH " == " i386" ] || [ " $ARCH " == " i686" ]; then
27+ URL=" $URL_LINUX32 "
28+ fi
29+ elif [ " $OS " == " Mac" ]; then
30+ URL=" $URL_MAC "
31+ elif [ " $OS " == " Windows" ]; then
32+ # Assuming WSL for Windows
33+ if [ " $ARCH " == " x86_64" ]; then
34+ URL=" $URL_WINDOWS64 "
35+ else
36+ URL=" $URL_WINDOWS32 "
37+ fi
38+ fi
39+
40+ if [ -z " $URL " ]; then
41+ echo " Unsupported OS or architecture: $OS $ARCH " >&2
42+ exit 1
43+ fi
44+
45+ echo " Downloading Processing.py for $OS ($ARCH )"
46+ wget -O processing.py-archive " $URL " && tar -xvzf processing.py-archive -C /usr/src/app
You can’t perform that action at this time.
0 commit comments