Initial working shell: bash-for-windows
- Cross-compiled Go-based shell for Windows (PE32+ executable) - Builtins: cd, pwd, echo, exit, export, source, alias, type - Coreutils: ls, cat, grep, sort, wc, head, find, cp, mv, rm, mkdir, touch, clear - Command chaining: &&, ||, ; - Pipes between builtins and external commands - Variable expansion (, ) and assignment (NAME=VALUE) - Tokenizer with single/double quote handling - Linux and Windows (x86_64) builds via build.sh
This commit is contained in:
19
build.sh
Executable file
19
build.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BUILD_DIR="build"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
echo "=== Building bash-for-windows ==="
|
||||
|
||||
# Linux build
|
||||
echo " -> Linux..."
|
||||
go build -ldflags="-s -w" -o "$BUILD_DIR/bash-windows" .
|
||||
|
||||
# Windows cross-compile
|
||||
echo " -> Windows (x86_64)..."
|
||||
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o "$BUILD_DIR/bash-windows.exe" .
|
||||
|
||||
echo ""
|
||||
echo "=== Build complete ==="
|
||||
ls -lh "$BUILD_DIR/"
|
||||
Reference in New Issue
Block a user