Skip to content

Commit

Permalink
add build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 28, 2024
1 parent 9a23315 commit 31c2518
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
*.so
*.dylib
main
julec
!julec/
julefmt

# Dist
dist/
Expand Down Expand Up @@ -34,4 +33,3 @@ __*

# Vim swap files
*.swp

18 changes: 18 additions & 0 deletions brun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Copyright 2024 The Jule Programming Language.
# Use of this source code is governed by a BSD 3-Clause
# license that can be found in the LICENSE file.

if [ -f ./src/main.jule ]; then
julec --opt-deadcode -o julefmt ./src
else
echo "error: working directory is not root directory"
exit
fi

if [ $? -eq 0 ]; then
./julefmt $@
else
echo "-----------------------------------------------------------------------"
echo "An unexpected error occurred while compiling JuleFmt. Check errors above."
fi
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Copyright 2024 The Jule Programming Language.
# Use of this source code is governed by a BSD 3-Clause
# license that can be found in the LICENSE file.

if [ -f ./src/main.jule ]; then
julec --opt-deadcode -o julefmt ./src
else
echo "error: working directory is not root directory"
exit
fi

if [ $? -eq 0 ]; then
echo "Compilation successful!"
else
echo "-----------------------------------------------------------------------"
echo "An unexpected error occurred while compiling JuleFmt. Check errors above."
fi

0 comments on commit 31c2518

Please sign in to comment.