+++ /dev/null
-package com.ReasoningTechnology.PaintIt;
-
-public class Black {
- public static void main(String[] args) {
- System.out.println("Paint it black.");
- }
-}
+++ /dev/null
-package com.ReasoningTechnology.PaintIt;
-
-public class Blue {
- public static void print(){
- System.out.println("Paint it blue.");
- }
- public static void main(String[] args) {
- print();
- }
-}
+package Ariadne;
+
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
+++ /dev/null
-package com.ReasoningTechnology.PaintIt;
-
-public class Green extends Blue {
- public static void print(){
- System.out.println("Paint it green.");
- }
-}
+package Ariadne;
+
/*
A node label.
+package Ariadne;
+
/*
An error token.
+++ /dev/null
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Black
+++ /dev/null
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Blue
+++ /dev/null
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Green
+++ /dev/null
-#!/bin/env bash
-
-if [ -z "$ENV_DEV" ]; then
- echo "make_PaintIt:: script can only be run from the developer environment"
- return 1
-fi
-
-# Ensure we are in the right directory
-cd "$REPO_HOME"/developer
-
-# Start with a fresh scratch_pad and remove a prior jvm
-# Depending, this is unnecessary and might even be undesirable.
-# Better to clean up the stuff we will rewrite instead of everything.
-# But for testing and in an unstable environment, this is probably best.
-echo "Starting with a clean scratch_pad and jvm directories..."
-rm -rf scratch_pad/*
-rm -rf jvm/PaintIt.jar
-
-# Compile all files (Black.java and Blue.java) with the correct package
-echo "Compiling files..."
-javac -d scratch_pad javac/Black.java javac/Blue.java javac/Green.java
-
-if [ $? -ne 0 ]; then
- echo "Compilation failed."
- exit 1
-fi
-
-# Create a JAR file from the compiled class files with correct package structure
-echo "Creating JAR file..."
-mkdir -p jvm
-jar cf jvm/PaintIt.jar -C scratch_pad .
-
-if [ $? -eq 0 ]; then
- echo "JAR file created successfully: jvm/PaintIt.jar"
-else
- echo "Failed to create JAR file."
- exit 1
-fi
-
-# cleanup the scratch_pad
-# Depending, this is unnecessary and might even be undesirable.
-# Would be better to clean up the stuff we wrote instead of everything.
-# But for testing and in an unstable environment, this is probably best.
-echo "Starting with a clean scratch_pad and jvm directories..."
-rm -rf scratch_pad/*
-
-# Create shell wrappers in developer/shell for easy execution
-echo "Creating shell wrappers..."
-mkdir -p shell
-
-cat > shell/black << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Black
-EOL
-chmod +x shell/black
-
-cat > shell/blue << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Blue
-EOL
-chmod +x shell/blue
-
-cat > shell/green << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Green
-EOL
-chmod +x shell/green
-
-echo "Shell wrappers created successfully: black, blue, green"
-
--- /dev/null
+#!/bin/bash
+
+# Ensure REPO_HOME and ENV_DEV_BUILD are set
+if [ -z "$REPO_HOME" ]; then
+ echo "release:: REPO_HOME is not set."
+ exit 1
+fi
+
+if [ -z "$ENV_DEV_BUILD" ]; then
+ echo "release:: ENV_DEV_BUILD is not set."
+ exit 1
+fi
+
+set -x
+cd "$REPO_HOME"/developer
+rm -rf scratch_pad/*
+set +x
+
+echo "clean complete."
--- /dev/null
+#!/bin/bash
+
+# Ensure REPO_HOME and ENV_DEV_BUILD are set
+if [ -z "$REPO_HOME" ]; then
+ echo "release:: REPO_HOME is not set."
+ exit 1
+fi
+
+if [ -z "$ENV_DEV_BUILD" ]; then
+ echo "release:: ENV_DEV_BUILD is not set."
+ exit 1
+fi
+
+wrapper=build
+
+set -x
+cd "$REPO_HOME"/developer
+rm -rf scratch_pad/*
+rm -f jvm/Ariadne.jar
+rm -f shell/{$wrapper}
+set +x
+
+echo "clean_all complete."
--- /dev/null
+#!/bin/bash
+
+# Ensure REPO_HOME and ENV_DEV_BUILD are set
+if [ -z "$REPO_HOME" ]; then
+ echo "release:: REPO_HOME is not set."
+ exit 1
+fi
+
+if [ -z "$ENV_DEV_BUILD" ]; then
+ echo "release:: ENV_DEV_BUILD is not set."
+ exit 1
+fi
+
+# Define release directory
+release_dir="$REPO_HOME"/release_candidate
+wrapper=build
+
+set -x
+cd "$REPO_HOME"/developer
+rm -rf scratch_pad/*
+rm -f jvm/Ariadne.jar
+rm -f shell/"$wrapper"
+rm -f "$release_dir"/Ariadne.jar
+rm -f "$release_dir"/{$wrapper}
+set +x
+
+echo "clean_dist complete."
--- /dev/null
+#!/usr/bin/env bash
+
+echo "REOP_HOME/developer/tool/env"
+
+# The build environment.
+#
+env_error=false
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+ echo "env_build:: This script must be sourced, not executed."
+ env_error=true
+fi
+if [ -z "$ENV_DEVELOPER" ]; then
+ echo "env_build:: script can only be run from the developer environment"
+ env_error=true
+fi
+if [ "$env_error" = true ]; then
+ exit 1
+fi
+
+# goovy use has been deprecated
+# export GROOVY_HOME="$REPO_HOME/tool_shared/third_party/groovy-4.0.9"
+
+# third party tools we will use
+export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-11"
+export PATH=\
+"$JAVA_HOME"/bin\
+:"$PATH"
+
+# where the tool build finds its class files:
+export CLASSPATH=\
+"$REPO_HOME"/developer/jvm\
+:"$REPO_HOME"/developer/jvm/Ariadne.jar\
+:"$JAVA_HOME"/lib\
+:"$CLASSPATH"
+
+# after we building the tool we might want to run it
+# the shell directory holds the bash UI wrappers
+export PATH=\
+"$REPO_HOME"/developer/shell\
+:"$PATH"
+
+export ENV_DEV_BUILD=true
+echo "${BASH_SOURCE[0]}" "complete"
+
+
+
+
+++ /dev/null
-#!/usr/bin/env bash
-
-# The build environment.
-#
-env_error=false
-if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
- echo "env_build:: This script must be sourced, not executed."
- env_error=true
-fi
-if [ -z "$ENV_DEV" ]; then
- echo "env_build:: script can only be run from the developer environment"
- env_error=true
-fi
-if [ "$env_error" = true ]; then
- return 1
-fi
-
-# goovy use has been deprecated
-# export GROOVY_HOME="$REPO_HOME/tool_shared/third_party/groovy-4.0.9"
-
-# third party tools we will use
-export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-11"
-export PATH=\
-"$JAVA_HOME"/bin\
-:"$PATH"
-
-# where the tool build finds its class files:
-export CLASSPATH=\
-"$REPO_HOME"/developer/jvm\
-:"$REPO_HOME"/developer/jvm/PaintIt.jar\
-:"$REPO_HOME"/developer/jvm/Ariadne.jar\
-:"$JAVA_HOME"/lib\
-:"$CLASSPATH"
-
-# after we building the tool we might want to run it
-# the shell directory holds the bash UI wrappers
-export PATH=\
-"$REPO_HOME"/developer/shell\
-:"$PATH"
-
-export ENV_DEV_BUILD=true
-echo "${BASH_SOURCE[0]}" "complete"
#!/bin/env bash
-if [ -z "$ENV_DEV" ]; then
- echo "make.sh:: script can only be run from the developer environment"
+if [ -z "$ENV_DEVELOPER" ]; then
+ echo "make_PaintIt:: script can only be run from the developer environment"
return 1
fi
-# Ensure we are in the right directory
+# work from the developer directory
cd "$REPO_HOME"/developer
-# Clean the scratch_pad and jvm directories
-echo "Cleaning scratch_pad and jvm directories..."
-rm -rf scratch_pad/*
-rm -rf jvm/*
-
-# Compile all files
echo "Compiling files..."
-javac -sourcepath javac:java_namespace -d scratch_pad javac/Black.java
+javac -d scratch_pad javac/*.java
if [ $? -ne 0 ]; then
echo "Compilation failed."
exit 1
fi
-# Create a JAR file from the compiled class files
echo "Creating JAR file..."
+jar_file=jvm/Ariadne.jar
mkdir -p jvm
-jar cf jvm/Ariadne.jar -C scratch_pad .
+jar cf $jar_file -C scratch_pad .
if [ $? -eq 0 ]; then
- echo "JAR file created successfully: jvm/Ariadne.jar"
+ echo "JAR file created successfully: $jar_file"
else
echo "Failed to create JAR file."
exit 1
fi
+
+# for these to run, the jar file must be in the CLASSPATH
+echo "Creating shell wrappers..."
+mkdir -p shell
+
+wrapper=build
+for file in $wrapper;do
+ cat > shell/$file << EOL
+ #!/bin/bash
+ java com/ReasoningTechnology/Ariadne/$file
+ EOL
+ chmod +x shell/$file
+done
+
+echo "make done"
+
+++ /dev/null
-#!/bin/env bash
-
-if [ -z "$ENV_DEV" ]; then
- echo "make_PaintIt:: script can only be run from the developer environment"
- return 1
-fi
-
-# Ensure we are in the right directory
-cd "$REPO_HOME"/developer
-
-# Start with a fresh scratch_pad and remove a prior jvm
-# Depending, this is unnecessary and might even be undesirable.
-# Better to clean up the stuff we will rewrite instead of everything.
-# But for testing and in an unstable environment, this is probably best.
-echo "Starting with a clean scratch_pad and jvm directories..."
-rm -rf scratch_pad/*
-rm -rf jvm/PaintIt.jar
-
-# Compile all files (Black.java and Blue.java) with the correct package
-echo "Compiling files..."
-javac -d scratch_pad javac/Black.java javac/Blue.java javac/Green.java
-
-if [ $? -ne 0 ]; then
- echo "Compilation failed."
- exit 1
-fi
-
-# Create a JAR file from the compiled class files with correct package structure
-echo "Creating JAR file..."
-mkdir -p jvm
-jar cf jvm/PaintIt.jar -C scratch_pad .
-
-if [ $? -eq 0 ]; then
- echo "JAR file created successfully: jvm/PaintIt.jar"
-else
- echo "Failed to create JAR file."
- exit 1
-fi
-
-# cleanup the scratch_pad
-# Depending, this is unnecessary and might even be undesirable.
-# Would be better to clean up the stuff we wrote instead of everything.
-# But for testing and in an unstable environment, this is probably best.
-echo "Starting with a clean scratch_pad and jvm directories..."
-rm -rf scratch_pad/*
-
-# Create shell wrappers in developer/shell for easy execution
-echo "Creating shell wrappers..."
-mkdir -p shell
-
-cat > shell/black << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Black
-EOL
-chmod +x shell/black
-
-cat > shell/blue << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Blue
-EOL
-chmod +x shell/blue
-
-cat > shell/green << EOL
-#!/bin/bash
-java com/ReasoningTechnology/PaintIt/Green
-EOL
-chmod +x shell/green
-
-
-echo "Shell wrappers created successfully: black, blue, green"
-
-#!/usr/bin/env groovy
-
-// Access the environment variable REPO_HOME
-def repo_home = System.getenv('REPO_HOME')
-def env_dev_build = System.getenv('ENV_DEV_BUILD')
-def arg_error = false
-if (!repo_home) {
- println "release:: REPO_HOME is not set."
- arg_error = true
+#!/bin/bash
+
+# Ensure REPO_HOME and ENV_DEV_BUILD are set
+if [ -z "$REPO_HOME" ]; then
+ echo "release:: REPO_HOME is not set."
+ exit 1
+fi
+
+if [ -z "$ENV_DEV_BUILD" ]; then
+ echo "release:: ENV_DEV_BUILD is not set."
+ exit 1
+fi
+
+# Define release directory
+release_dir="$REPO_HOME/release_candidate"
+
+# Create release directory if it doesn't exist
+if [ ! -d "$release_dir" ]; then
+ mkdir -p "$release_dir"
+fi
+
+# Function to copy and set permissions
+install_file() {
+ source_fp="$1"
+ target_dp="$2"
+ perms="$3"
+
+ target_file="$target_dp/$(basename "$source_fp")"
+
+ if [ ! -f "$source_fp" ]; then
+ echo "install_file:: Source file '$source_fp' does not exist."
+ return 1
+ fi
+
+ if ! install -m "$perms" "$source_fp" "$target_file"; then
+ echo "Error: Failed to install $(basename "$source_fp") to $target_dp"
+ exit 1
+ else
+ echo "Installed $(basename "$source_fp") to $target_dp with permissions $perms"
+ fi
}
-if (!env_dev_build) {
- println "release:: ENV_DEV_BUILD is not set."
- arg_error = true
-}
-if (arg_error) {
- System.exit(1)
-}
-
-def release_dir = "${repo_home}/release_candidate"
-def release_dir_file = new File(release_dir)
-if (!release_dir_file.exists()) {
- release_dir_file.mkdirs()
-}
-
-// Function to use 'install' command for copying and setting permissions
-def install_file(source_fp, target_dp, perms) {
- def target_file = "${target_dp}/${new File(source_fp).name}"
- try {
- def cmd = ["install", "-m", perms, source_fp, target_file]
- def process = cmd.execute()
- process.waitFor()
- if (process.exitValue() != 0) {
- println "Error: Failed to install ${new File(source_fp).name} to ${target_dp}"
- println process.err.text
- System.exit(1)
- }
- println "Installed ${new File(source_fp).name} to ${target_dp} with permissions ${perms}"
- } catch (Exception e) {
- println "Error: ${e.message}"
- System.exit(1)
- }
-}
-
-println "Starting release process..."
+
+echo "Starting release process..."
-def build_fp = "${repo_home}/developer/shell/build"
-def ariadne_jar_fp = "${repo_home}/developer/jvm/AriadneGraph.jar"
+# Paths to shell wrappers and JAR file
+shell_dir="$REPO_HOME/developer/shell"
+Ariadne_jar_fp="$REPO_HOME/developer/jvm/Ariadne.jar"
-// Install the build script
-install_file(build_fp, release_dir, "ug+r")
+# Install the JAR file
+install_file "$Ariadne_jar_fp" "$release_dir" "ug+r"
-// Install the JAR file
-install_file(ariadne_jar_fp, release_dir, "ug+r")
+# Install shell wrappers
+for wrapper in black blue green; do
+ install_file "$shell_dir/$wrapper" "$release_dir" "ug+r+x"
+done
-println "Release process completed successfully."
+echo "Release process completed successfully."
+++ /dev/null
-#!/bin/env bash
-
-# get this from the project management level exector directory
-"$REPO_HOME"/executor/version
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+java com/ReasoningTechnology/PaintIt/Black
--- /dev/null
+#!/bin/bash
+java com/ReasoningTechnology/PaintIt/Blue
--- /dev/null
+#!/bin/bash
+java com/ReasoningTechnology/PaintIt/Green
ENV_PM=true
-PROJECT="$PROJECT"_PMg
+PROJECT="$PROJECT"_administrator
export PATH=\
"$REPO_HOME"/tool\
# but if you don't have that, then source this into the environment.
script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
-export REPO_HOME="${script_path%/*}"
+export REPO_HOME="${script_path%/*}/"
export PROJECT=$(basename "$REPO_HOME")
PPS1="\n[$PROJECT]\n\u@\h§$(pwd)§\n> "
source "${script_path}/env_base"
fi
-PROJECT="$PROJECT"_DEVELOPER
+PROJECT="$PROJECT"_developer
export PATH=\
-"$REPO_HOME/developer/tool"\
+"$REPO_HOME"/developer/tool/\
+:"$REPO_HOME"/tool_shared/bespoke/\
:"$PATH"
# so the .gitignore files can be seen:
alias ls="ls -a"
-cd "$REPO_HOME/developer"
+cd "$REPO_HOME"/developer/
+export ENV_DEVELOPER=true
+source tool/env
-export ENV_DEV=true
-source "$REPO_HOME"/developer/tool/env_build
echo "${BASH_SOURCE[0]}" "complete"
PROJECT="$PROJECT"_TESTER
export PATH=\
-"$REPO_HOME"/tester/executor\
+"$REPO_HOME"/tester/executor/\
+:"$REPO_HOME"/tool_shared/bespoke/\
:"$PATH"
-cd "$REPO_HOME"/tester
-
-
+cd "$REPO_HOME"/tester/
export ENV_TESTER=true
-source executor/env_tester
+source tool/env
+
echo "${BASH_SOURCE[0]}" "complete"