-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release building scripts and simple unified scripts to run and unpack
- Loading branch information
Showing
5 changed files
with
117 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
script_dir=$(dirname $0) | ||
|
||
macos_dir="$script_dir/macos/lucid" | ||
linux_dir="$script_dir/linux/lucid" | ||
|
||
# set bin_dir to the correct directory based on the OS | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
bin_dir=$macos_dir | ||
if [ ! -f "$bin_dir/dpt" ]; then | ||
echo "MacOS binary not found in $macos_dir" | ||
echo "You may need to run the 'unpack.sh' script in the release directory" | ||
exit 1 | ||
fi | ||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
if [ ! -f "$linux_dir/dpt" ]; then | ||
echo "Linux binary not found in $linux_dir" | ||
echo "You may need to run the 'unpack.sh' script in the release directory" | ||
exit 1 | ||
fi | ||
bin_dir=$linux_dir | ||
else | ||
echo "Unsupported OS -- you should build the project from source" | ||
exit 1 | ||
fi | ||
|
||
# run dpt in the appropriate directory | ||
$bin_dir/dpt $@ | ||
|
||
|
||
|
||
# case "$1" in | ||
# compile) | ||
# shift # Remove the first argument and pass the rest to the compiler | ||
# exec "$APPDIR/usr/bin/dptc" "$@" | ||
# ;; | ||
# interpret) | ||
# shift # Remove the first argument and pass the rest to the interpreter | ||
# exec "$APPDIR/usr/bin/dpt" "$@" | ||
# ;; | ||
# *) | ||
# echo "Usage: $0 {compile|interpret} args" | ||
# exit 1 | ||
# ;; | ||
# esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# unpack the release tarballs in this script's directory | ||
|
||
my_dir="$(dirname "$0")" | ||
|
||
# check if each tarball exists and unpack it | ||
if [ ! -f $my_dir/macos.tar.gz ]; then | ||
echo "macos.tar.gz not found -- skipping" | ||
else | ||
tar -xvf $my_dir/macos.tar.gz | ||
fi | ||
|
||
if [ ! -f $my_dir/linux.tar.gz ]; then | ||
echo "linux.tar.gz not found -- skipping" | ||
else | ||
tar -xvf $my_dir/linux.tar.gz | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters