Skip to content

Commit

Permalink
Separated shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lorol committed Feb 3, 2021
1 parent ce5fbd2 commit 4758296
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ if [[ -z "$INSTALLDIR" ]]; then
fi
echo "INSTALLDIR: $INSTALLDIR"

pde_path=`find /Applications/Arduino.app/ -name pde.jar`
core_path=`find /Applications/Arduino.app/ -name arduino-core.jar`
lib_path=`find /Applications/Arduino.app/ -name commons-codec-1.7.jar`
pde_path=`find ../../../ -name pde.jar`
core_path=`find ../../../ -name arduino-core.jar`
lib_path=`find ../../../ -name commons-codec-1.7.jar`
if [[ -z "$core_path" || -z "$pde_path" ]]; then
echo "Some java libraries have not been built yet (did you run ant build?)"
return 1
Expand All @@ -19,7 +19,7 @@ echo "lib_path: $lib_path"
set -e

mkdir -p bin
javac -source 1.8 -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
-d bin src/ESP32FS.java

pushd bin
Expand Down
37 changes: 37 additions & 0 deletions make_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

if [[ -z "$INSTALLDIR" ]]; then
INSTALLDIR="$HOME/Documents/Arduino"
fi
echo "INSTALLDIR: $INSTALLDIR"

pde_path=`find /Applications/Arduino.app/ -name pde.jar`
core_path=`find /Applications/Arduino.app/ -name arduino-core.jar`
lib_path=`find /Applications/Arduino.app/ -name commons-codec-1.7.jar`
if [[ -z "$core_path" || -z "$pde_path" ]]; then
echo "Some java libraries have not been built yet (did you run ant build?)"
return 1
fi
echo "pde_path: $pde_path"
echo "core_path: $core_path"
echo "lib_path: $lib_path"

set -e

mkdir -p bin
javac -source 1.8 -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
-d bin src/ESP32FS.java

pushd bin
mkdir -p $INSTALLDIR/tools
rm -rf $INSTALLDIR/tools/ESP32FS
mkdir -p $INSTALLDIR/tools/ESP32FS/tool
zip -r $INSTALLDIR/tools/ESP32FS/tool/esp32fs.jar *
popd

dist=$PWD/dist
rev=$(git describe --tags)
mkdir -p $dist
pushd $INSTALLDIR/tools
zip -r $dist/ESP32FS-$rev.zip ESP32FS/
popd

0 comments on commit 4758296

Please sign in to comment.