Skip to content

Modular logistics and supply chain operating system (LSOS)

added scripts

Ronald A. Richardson0a3ad2f0a68f
diff --git a/.gitignore b/.gitignore
index 3c249a8f..7ffc6ca5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,8 +20,15 @@ composer-auth.json
docker/database/*
docker/database/mysql/*
.talismanrc
+verdaccio/minio
+verdaccio/config/htpasswd
+verdaccio/storage
# private packages
packages/billing
packages/flespi
packages/loconav
-packages/projectargus-engine
\ No newline at end of file
+packages/projectargus-engine
+# wip
+packages/solid
+solid
+verdaccio
\ No newline at end of file
diff --git a/scripts/install-packages.sh b/scripts/install-packages.sh
new file mode 100644
index 00000000..174dc167
--- /dev/null
+++ b/scripts/install-packages.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Find the root directory of your repository
+root_dir=$(git rev-parse --show-toplevel)
+
+# Check if the packages directory exists
+packages_dir="$root_dir/packages"
+if [ ! -d "$packages_dir" ]; then
+ echo "Packages directory not found."
+ exit 1
+fi
+
+# Check for the command-line argument to remove pnpm-lock.yaml
+remove_lock=false
+if [ "$1" == "--remove-lock" ]; then
+ remove_lock=true
+fi
+
+# Navigate to the packages directory
+cd "$packages_dir"
+
+# Find all child directories and run pnpm install if package.json exists
+for dir in */; do
+ if [[ -f "${dir}package.json" ]]; then
+ echo "Running pnpm install in $dir"
+
+ # Remove pnpm-lock.yaml if the option is set
+ if [ "$remove_lock" = true ] && [ -f "${dir}pnpm-lock.yaml" ]; then
+ echo "Removing pnpm-lock.yaml in $dir"
+ rm "${dir}pnpm-lock.yaml"
+ fi
+
+ cd "$dir"
+ pnpm install
+ cd "$packages_dir" # Go back to the packages directory
+ else
+ echo "No package.json found in $dir, skipping..."
+ fi
+done