setup
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Fri, 7 Feb 2025 09:37:41 +0000 (09:37 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Fri, 7 Feb 2025 09:37:41 +0000 (09:37 +0000)
28 files changed:
.gitignore [new file with mode: 0644]
LICENSE.txt [new file with mode: 0644]
developer/amd64/.githolder [new file with mode: 0644]
developer/cc🖉/environment.h [new file with mode: 0644]
developer/deprecated/.githolder [new file with mode: 0644]
developer/document🖉/.githolder [new file with mode: 0644]
developer/experiment/.githolder [new file with mode: 0644]
developer/scratchpad/.githolder [new file with mode: 0644]
developer/tool🖉/env [new file with mode: 0644]
developer/tool🖉/make [new file with mode: 0755]
developer/tool🖉/makefile [new file with mode: 0644]
document🖉/.githolder [new file with mode: 0644]
env_administrator [new symlink]
env_developer [new symlink]
env_tester [new symlink]
release/.githolder [new file with mode: 0644]
tester/.githolder [new file with mode: 0644]
tool_shared/bespoke🖉/env [new file with mode: 0644]
tool_shared/bespoke🖉/version [new file with mode: 0755]
tool_shared/customized/.githolder [new file with mode: 0644]
tool_shared/document🖉/install.txt [new file with mode: 0644]
tool_shared/env [new file with mode: 0644]
tool_shared/third_party/RT-project-share [new symlink]
tool_shared/third_party/emacs_30.0.92 [new symlink]
tool_shared/third_party/upstream/.githolder [new file with mode: 0644]
tool_shared/version [new file with mode: 0755]
tool🖉/add_git_holder [new file with mode: 0755]
tool🖉/env [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..02b640c
--- /dev/null
@@ -0,0 +1,7 @@
+#note also the .gitignore files in the tool and developer directories and any
+# other directory that might have one.
+
+#*#
+*~
+a.out
+.gradle/
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644 (file)
index 0000000..59f223e
--- /dev/null
@@ -0,0 +1 @@
+Copyright © 2025 Thomas Walker Lynch - All Rights Reserved
diff --git a/developer/amd64/.githolder b/developer/amd64/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/cc🖉/environment.h b/developer/cc🖉/environment.h
new file mode 100644 (file)
index 0000000..a9d3518
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef Mpblock·ENVIRONMENT_H
+#define Mpblock·ENVIRONMENT_H
+  #include <stdint.h>
+  #include <stdbool.h>
+
+  typedef unsigned int uint;
+  #define FREE(pt) free(pt); (pt) = NULL;
+
+#endif
diff --git a/developer/deprecated/.githolder b/developer/deprecated/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/document🖉/.githolder b/developer/document🖉/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/experiment/.githolder b/developer/experiment/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/scratchpad/.githolder b/developer/scratchpad/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/tool🖉/env b/developer/tool🖉/env
new file mode 100644 (file)
index 0000000..f9e2584
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+# input guards
+
+  env_must_be="tool_shared/bespoke🖉/env"
+  error_bad_env=false
+  error_not_sourced=false
+  if [ "$ENV" != "$env_must_be" ]; then
+    echo "$(script_fp):: error: must be run in the $env_must_be environment"
+    error_bad_env=true
+  fi
+  if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+    echo "$script_afp:: This script must be sourced, not executed."
+    error_not_sourced=true
+  fi
+  if $error_not_sourced; then exit 1; fi
+  if $error_bad_env; then return 1; fi
+
+# so we can do the build
+
+export PATH=\
+"$REPO_HOME"/developer/tool🖉/\
+:"$PATH"
+
+# misc
+
+  # make .githolder and .gitignore visible
+  alias ls="ls -a"
+
+# some feedback to show all went well
+
+  export PROMPT_DECOR="$PROJECT"_developer
+  export ENV=$(script_fp)
+  echo ENV "$ENV"
+  cd "$REPO_HOME"/developer/
+
+
+
diff --git a/developer/tool🖉/make b/developer/tool🖉/make
new file mode 100755 (executable)
index 0000000..84e1111
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/env /bin/bash
+
+set -e
+cd ${REPO_HOME}/developer
+/bin/make -f tool🖉/makefile $@
+
diff --git a/developer/tool🖉/makefile b/developer/tool🖉/makefile
new file mode 100644 (file)
index 0000000..a0da057
--- /dev/null
@@ -0,0 +1,18 @@
+
+
+RT-INCOMMON:=$(REPO_HOME)/tool_shared/third_party/RT-project-share/release
+
+include $(RT-INCOMMON)/make/environment_RT_0
+
+CFLAGS+=-Werror -include "$(RT-INCOMMON)/make/RT_0.h"
+LINKFLAGS+= -l$(PROJECT)
+LIBFILE=$(LIBDIR)/lib$(PROJECT).a
+
+include $(RT-INCOMMON)/make/targets
+-include $(DEPFILE)
+
+
+
+
+
+
diff --git a/document🖉/.githolder b/document🖉/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/env_administrator b/env_administrator
new file mode 120000 (symlink)
index 0000000..e5191fc
--- /dev/null
@@ -0,0 +1 @@
+tool_shared/third_party/RT-project-share/env_administrator
\ No newline at end of file
diff --git a/env_developer b/env_developer
new file mode 120000 (symlink)
index 0000000..3e5f67c
--- /dev/null
@@ -0,0 +1 @@
+tool_shared/third_party/RT-project-share/env_developer
\ No newline at end of file
diff --git a/env_tester b/env_tester
new file mode 120000 (symlink)
index 0000000..b542358
--- /dev/null
@@ -0,0 +1 @@
+tool_shared/third_party/RT-project-share/env_tester
\ No newline at end of file
diff --git a/release/.githolder b/release/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/.githolder b/tester/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tool_shared/bespoke🖉/env b/tool_shared/bespoke🖉/env
new file mode 100644 (file)
index 0000000..01f47a3
--- /dev/null
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
+
+# without this bash takes non-matching globs literally
+shopt -s nullglob
+
+# --------------------------------------------------------------------------------
+# project definition
+
+# actual absolute director path for this script file
+
+  script_adp(){
+    dirname "$script_afp"
+  }
+
+# assume this script is located  $REPO_HOME/tools_shared/bespoke and work backwards
+# to get $REPO_HOME, etc.
+
+  REPO_HOME=$(dirname "$(dirname "$(script_adp)")")
+  echo REPO_HOME "$REPO_HOME"
+
+  PROJECT=$(basename "$REPO_HOME")
+  echo PROJECT "$PROJECT"
+
+  # set the prompt decoration to the name of the project
+  PROMPT_DECOR=$PROJECT
+
+  # include the project bespoke tools
+  PATH="$REPO_HOME"/tool_shared/bespoke🖉:"$PATH"
+
+  export REPO_HOME PROJECT PROMPT_DECOR PATH
+
+# --------------------------------------------------------------------------------
+# The project administrator sets up the following tools for all roles to use:
+#
+  PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/bash:$PATH"
+  PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/amd64:$PATH"
+  PATH="$REPO_HOME/tool_shared/third_party/emacs/bin:$PATH"
+
+  # after having installed Itellij IDEA
+  PATH="$REPO_HOME/tool_shared/third_party/idea-IC-243.21565.193/bin:$PATH"
+
+  JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-23.0.1"
+  MOSAIC_HOME="$REPO_HOME/tool_shared/third_party/Mosaic"
+
+  export PATH JAVA_HOME MOSAIC_HOME
+
+# --------------------------------------------------------------------------------
+# the following functions are provided for other scripts to use.
+# at the top of files that make use of these functions put the following line:
+#  script_afp=$(realpath "${BASH_SOURCE[0]}")
+#
+
+  ## script's filename
+  script_fn(){
+    basename "$script_afp"
+  }
+
+  ## script's dirpath relative to $REPO_HOME
+  script_fp(){
+    realpath --relative-to="${REPO_HOME}" "$script_afp"
+  }
+
+  ## script's dirpath relative to $REPO_HOME
+  script_dp(){
+    dirname "$(script_fp)"
+  }
+
+  export -f script_adp script_fn script_dp script_fp
+
+# --------------------------------------------------------------------------------
+# closing
+#
+
+  export ENV=$(script_fp)
+  echo ENV "$ENV"
+
diff --git a/tool_shared/bespoke🖉/version b/tool_shared/bespoke🖉/version
new file mode 100755 (executable)
index 0000000..51abf9f
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+# 0.1 pulled groovy files from GQL_to_Cypher build.gradle
+# 0.2 conversion to Java
+# 0.3 refactored, split into smaller pieces, made into package
+
+echo v0.3
+
diff --git a/tool_shared/customized/.githolder b/tool_shared/customized/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tool_shared/document🖉/install.txt b/tool_shared/document🖉/install.txt
new file mode 100644 (file)
index 0000000..5897489
--- /dev/null
@@ -0,0 +1,19 @@
+----------------------------------------
+RT-project-share 
+
+  lrwxrwxrwx. 1 Thomas-developer Thomas-developer  41 2025-01-22 06:29 emacs_30.0.92 -> /home/Thomas-masu/developer/emacs_30.0.92
+  lrwxrwxrwx. 1 Thomas-developer Thomas-developer  45 2025-01-22 06:29 RT-project-share -> /home/Thomas-masu/developer/RT-project-share/
+
+
+----------------------------------------
+# for downloads of tar files etc. for third party tools :
+  drwx------. 1 Thomas-developer Thomas-developer 354 2024-12-09 02:45 upstream
+     
+
+----------------------------------------
+generally when installing third party tools from a repo
+
+  . env_administrator
+  cd tools_shared/third_party
+  git clone <project>
+  cd project
diff --git a/tool_shared/env b/tool_shared/env
new file mode 100644 (file)
index 0000000..01f47a3
--- /dev/null
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
+
+# without this bash takes non-matching globs literally
+shopt -s nullglob
+
+# --------------------------------------------------------------------------------
+# project definition
+
+# actual absolute director path for this script file
+
+  script_adp(){
+    dirname "$script_afp"
+  }
+
+# assume this script is located  $REPO_HOME/tools_shared/bespoke and work backwards
+# to get $REPO_HOME, etc.
+
+  REPO_HOME=$(dirname "$(dirname "$(script_adp)")")
+  echo REPO_HOME "$REPO_HOME"
+
+  PROJECT=$(basename "$REPO_HOME")
+  echo PROJECT "$PROJECT"
+
+  # set the prompt decoration to the name of the project
+  PROMPT_DECOR=$PROJECT
+
+  # include the project bespoke tools
+  PATH="$REPO_HOME"/tool_shared/bespoke🖉:"$PATH"
+
+  export REPO_HOME PROJECT PROMPT_DECOR PATH
+
+# --------------------------------------------------------------------------------
+# The project administrator sets up the following tools for all roles to use:
+#
+  PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/bash:$PATH"
+  PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/amd64:$PATH"
+  PATH="$REPO_HOME/tool_shared/third_party/emacs/bin:$PATH"
+
+  # after having installed Itellij IDEA
+  PATH="$REPO_HOME/tool_shared/third_party/idea-IC-243.21565.193/bin:$PATH"
+
+  JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-23.0.1"
+  MOSAIC_HOME="$REPO_HOME/tool_shared/third_party/Mosaic"
+
+  export PATH JAVA_HOME MOSAIC_HOME
+
+# --------------------------------------------------------------------------------
+# the following functions are provided for other scripts to use.
+# at the top of files that make use of these functions put the following line:
+#  script_afp=$(realpath "${BASH_SOURCE[0]}")
+#
+
+  ## script's filename
+  script_fn(){
+    basename "$script_afp"
+  }
+
+  ## script's dirpath relative to $REPO_HOME
+  script_fp(){
+    realpath --relative-to="${REPO_HOME}" "$script_afp"
+  }
+
+  ## script's dirpath relative to $REPO_HOME
+  script_dp(){
+    dirname "$(script_fp)"
+  }
+
+  export -f script_adp script_fn script_dp script_fp
+
+# --------------------------------------------------------------------------------
+# closing
+#
+
+  export ENV=$(script_fp)
+  echo ENV "$ENV"
+
diff --git a/tool_shared/third_party/RT-project-share b/tool_shared/third_party/RT-project-share
new file mode 120000 (symlink)
index 0000000..82f857e
--- /dev/null
@@ -0,0 +1 @@
+/home/Thomas-masu/developer/RT-project-share/
\ No newline at end of file
diff --git a/tool_shared/third_party/emacs_30.0.92 b/tool_shared/third_party/emacs_30.0.92
new file mode 120000 (symlink)
index 0000000..3840045
--- /dev/null
@@ -0,0 +1 @@
+/home/Thomas-masu/developer/emacs_30.0.92
\ No newline at end of file
diff --git a/tool_shared/third_party/upstream/.githolder b/tool_shared/third_party/upstream/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tool_shared/version b/tool_shared/version
new file mode 100755 (executable)
index 0000000..be170e5
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+echo v0.1
+
diff --git a/tool🖉/add_git_holder b/tool🖉/add_git_holder
new file mode 100755 (executable)
index 0000000..0116b84
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Find empty directories and add a .githolder file
+target_file=".githolder"
+
+find . -type d -empty -print0 | while IFS= read -r -d '' dir; do
+  touch "$dir/$target_file"
+  echo "Added $target_file to $dir"
+done
diff --git a/tool🖉/env b/tool🖉/env
new file mode 100644 (file)
index 0000000..4f0c70f
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+# input guards
+
+  env_must_be="tool_shared/bespoke/env"
+  error=false
+  if [ "$ENV" != "$env_must_be" ]; then
+    echo "$(script_fp):: error: must be run in the $env_must_be environment"
+    error=true
+  fi
+  if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+    echo "$script_afp:: This script must be sourced, not executed."
+    error=true
+  fi
+  if $error; then exit 1; fi
+
+export PATH=\
+"$REPO_HOME"/tool_shared/bespoke/\
+:"$PATH"
+
+# expose sneaky hidden files
+alias ls="ls -a"
+
+# some feedback to show all went well
+
+  export PROMPT_DECOR="$PROJECT"_administrator
+  export ENV=$(script_fp)
+  echo ENV "$ENV"