Clean commands up
This commit is contained in:
22
cmd
22
cmd
@@ -2,20 +2,26 @@
|
|||||||
|
|
||||||
# This file belongs to the framework. You are not expected to modify it.
|
# This file belongs to the framework. You are not expected to modify it.
|
||||||
|
|
||||||
# FIXME: Obviously this file isn't nearly robust enough. Make it so.
|
# Managed binary runner - runs framework-managed binaries like node, pnpm, tsx
|
||||||
|
# Usage: ./cmd <command> [args...]
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: ./cmd <command> [args...]"
|
||||||
|
echo ""
|
||||||
|
echo "Available commands:"
|
||||||
|
for cmd in "$DIR"/framework/cmd.d/*; do
|
||||||
|
if [ -x "$cmd" ]; then
|
||||||
|
basename "$cmd"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
subcmd="$1"
|
subcmd="$1"
|
||||||
|
|
||||||
# echo "$subcmd"
|
|
||||||
|
|
||||||
#exit 3
|
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
|
||||||
echo will run "$DIR"/framework/cmd.d/"$subcmd" "$@"
|
|
||||||
|
|
||||||
exec "$DIR"/framework/cmd.d/"$subcmd" "$@"
|
exec "$DIR"/framework/cmd.d/"$subcmd" "$@"
|
||||||
|
|||||||
1
framework/develop.d/db
Symbolic link
1
framework/develop.d/db
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../common.d/db
|
||||||
1
framework/develop.d/migrate
Symbolic link
1
framework/develop.d/migrate
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../common.d/migrate
|
||||||
1
framework/mgmt.d/db
Symbolic link
1
framework/mgmt.d/db
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../common.d/db
|
||||||
1
framework/mgmt.d/migrate
Symbolic link
1
framework/mgmt.d/migrate
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../common.d/migrate
|
||||||
Reference in New Issue
Block a user