diff --git a/arch-dispatcher b/arch-dispatcher new file mode 100755 index 0000000..2d207c6 --- /dev/null +++ b/arch-dispatcher @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# ============================================================================= +# ~/bin/arch-dispatcher — Universal Architecture Binary Runner +# Dispatches commands to ~/bin/arch/$(uname -m)/ +# ============================================================================= +CMD="$(basename "$0")" +ARCH="$(uname -m)" +TARGET="$HOME/bin/arch/$ARCH/$CMD" + +if [ -x "$TARGET" ]; then + exec "$TARGET" "$@" +fi + +echo "Error: '$CMD' is not available for architecture '$ARCH' in ~/bin/arch/$ARCH/" >&2 +exit 127 diff --git a/arch/aarch64/fleetMonitor b/arch/aarch64/fleetMonitor new file mode 100755 index 0000000..9e2c302 Binary files /dev/null and b/arch/aarch64/fleetMonitor differ diff --git a/mpdplayer b/arch/aarch64/mpdplayer similarity index 100% rename from mpdplayer rename to arch/aarch64/mpdplayer diff --git a/arch/aarch64/pj b/arch/aarch64/pj new file mode 100755 index 0000000..422595a Binary files /dev/null and b/arch/aarch64/pj differ diff --git a/arch/armv6l/bot-armv6l b/arch/armv6l/bot-armv6l new file mode 100755 index 0000000..90708d4 Binary files /dev/null and b/arch/armv6l/bot-armv6l differ diff --git a/obmenugen b/arch/i386/obmenugen similarity index 100% rename from obmenugen rename to arch/i386/obmenugen diff --git a/SimpleReceive b/arch/x86_64/SimpleReceive similarity index 100% rename from SimpleReceive rename to arch/x86_64/SimpleReceive diff --git a/SimpleSend b/arch/x86_64/SimpleSend similarity index 100% rename from SimpleSend rename to arch/x86_64/SimpleSend diff --git a/Test b/arch/x86_64/Test similarity index 100% rename from Test rename to arch/x86_64/Test diff --git a/Updater b/arch/x86_64/Updater similarity index 100% rename from Updater rename to arch/x86_64/Updater diff --git a/aclock b/arch/x86_64/aclock similarity index 100% rename from aclock rename to arch/x86_64/aclock diff --git a/atpdec b/arch/x86_64/atpdec similarity index 100% rename from atpdec rename to arch/x86_64/atpdec diff --git a/baudline_jack b/arch/x86_64/baudline_jack similarity index 100% rename from baudline_jack rename to arch/x86_64/baudline_jack diff --git a/beep b/arch/x86_64/beep similarity index 100% rename from beep rename to arch/x86_64/beep diff --git a/cfdg b/arch/x86_64/cfdg similarity index 100% rename from cfdg rename to arch/x86_64/cfdg diff --git a/convert4chan b/arch/x86_64/convert4chan similarity index 100% rename from convert4chan rename to arch/x86_64/convert4chan diff --git a/demorse b/arch/x86_64/demorse similarity index 100% rename from demorse rename to arch/x86_64/demorse diff --git a/dh b/arch/x86_64/dh similarity index 100% rename from dh rename to arch/x86_64/dh diff --git a/dither b/arch/x86_64/dither similarity index 100% rename from dither rename to arch/x86_64/dither diff --git a/encodeFramesTest b/arch/x86_64/encodeFramesTest similarity index 100% rename from encodeFramesTest rename to arch/x86_64/encodeFramesTest diff --git a/encodeTest b/arch/x86_64/encodeTest similarity index 100% rename from encodeTest rename to arch/x86_64/encodeTest diff --git a/ffmpeg_harvid b/arch/x86_64/ffmpeg_harvid similarity index 100% rename from ffmpeg_harvid rename to arch/x86_64/ffmpeg_harvid diff --git a/ffprobe_harvid b/arch/x86_64/ffprobe_harvid similarity index 100% rename from ffprobe_harvid rename to arch/x86_64/ffprobe_harvid diff --git a/flowBuilder b/arch/x86_64/flowBuilder similarity index 100% rename from flowBuilder rename to arch/x86_64/flowBuilder diff --git a/arch/x86_64/gh b/arch/x86_64/gh new file mode 100755 index 0000000..e0426e5 Binary files /dev/null and b/arch/x86_64/gh differ diff --git a/harvid b/arch/x86_64/harvid similarity index 100% rename from harvid rename to arch/x86_64/harvid diff --git a/hub b/arch/x86_64/hub similarity index 100% rename from hub rename to arch/x86_64/hub diff --git a/ibniz b/arch/x86_64/ibniz similarity index 100% rename from ibniz rename to arch/x86_64/ibniz diff --git a/morse b/arch/x86_64/morse similarity index 100% rename from morse rename to arch/x86_64/morse diff --git a/motion_vector b/arch/x86_64/motion_vector similarity index 100% rename from motion_vector rename to arch/x86_64/motion_vector diff --git a/osc-sq b/arch/x86_64/osc-sq similarity index 100% rename from osc-sq rename to arch/x86_64/osc-sq diff --git a/arch/x86_64/otop b/arch/x86_64/otop new file mode 100755 index 0000000..22deb35 Binary files /dev/null and b/arch/x86_64/otop differ diff --git a/pde2c b/arch/x86_64/pde2c similarity index 100% rename from pde2c rename to arch/x86_64/pde2c diff --git a/pdeide b/arch/x86_64/pdeide similarity index 100% rename from pdeide rename to arch/x86_64/pdeide diff --git a/pixilang b/arch/x86_64/pixilang similarity index 100% rename from pixilang rename to arch/x86_64/pixilang diff --git a/postgen b/arch/x86_64/postgen similarity index 100% rename from postgen rename to arch/x86_64/postgen diff --git a/slowmoFlowEdit b/arch/x86_64/slowmoFlowEdit similarity index 100% rename from slowmoFlowEdit rename to arch/x86_64/slowmoFlowEdit diff --git a/slowmoInfo b/arch/x86_64/slowmoInfo similarity index 100% rename from slowmoInfo rename to arch/x86_64/slowmoInfo diff --git a/slowmoInterpolate b/arch/x86_64/slowmoInterpolate similarity index 100% rename from slowmoInterpolate rename to arch/x86_64/slowmoInterpolate diff --git a/slowmoRenderer b/arch/x86_64/slowmoRenderer similarity index 100% rename from slowmoRenderer rename to arch/x86_64/slowmoRenderer diff --git a/slowmoUI b/arch/x86_64/slowmoUI similarity index 100% rename from slowmoUI rename to arch/x86_64/slowmoUI diff --git a/sunvox b/arch/x86_64/sunvox similarity index 100% rename from sunvox rename to arch/x86_64/sunvox diff --git a/till b/arch/x86_64/till similarity index 100% rename from till rename to arch/x86_64/till diff --git a/videoInfo b/arch/x86_64/videoInfo similarity index 100% rename from videoInfo rename to arch/x86_64/videoInfo diff --git a/visualizeFlow b/arch/x86_64/visualizeFlow similarity index 100% rename from visualizeFlow rename to arch/x86_64/visualizeFlow diff --git a/xjremote b/arch/x86_64/xjremote similarity index 100% rename from xjremote rename to arch/x86_64/xjremote diff --git a/xrandr-invert-colors.bin b/arch/x86_64/xrandr-invert-colors.bin similarity index 100% rename from xrandr-invert-colors.bin rename to arch/x86_64/xrandr-invert-colors.bin diff --git a/bin-env b/bin-env new file mode 100644 index 0000000..2b5e857 --- /dev/null +++ b/bin-env @@ -0,0 +1,17 @@ +# ~/bin/bin-env — Architecture-Aware Fleet Path Setup +# Sourced in ~/.bashrc and ~/.zshrc across t520, bazina, boxC, penguin, phone + +_ARCH="$(uname -m)" +if [ -d "$HOME/bin/arch/$_ARCH" ]; then + case ":$PATH:" in + *":$HOME/bin/arch/$_ARCH:"*) ;; + *) export PATH="$HOME/bin/arch/$_ARCH:$PATH" ;; + esac +fi + +case ":$PATH:" in + *":$HOME/bin:"*) ;; + *) export PATH="$HOME/bin:$PATH" ;; +esac + +unset _ARCH diff --git a/otop b/otop index be47f98..f7503de 100755 --- a/otop +++ b/otop @@ -2,32 +2,36 @@ # ============================================================================= # ~/bin/otop — Observatoř Top Launcher (Grid Telemetry & Fleet Matrix) # ============================================================================= +ARCH="$(uname -m)" -# 1. Lokální sestavení v observator/otop +# 1. Nativní architektura v ~/bin/arch/$ARCH/otop +if [ -x "$HOME/bin/arch/$ARCH/otop" ]; then + exec "$HOME/bin/arch/$ARCH/otop" "$@" +fi + +# 2. Lokální sestavení v observator/otop if [ -x "$HOME/src/observator/otop/bin/otop" ]; then exec "$HOME/src/observator/otop/bin/otop" "$@" fi -# 2. Systémově nainstalovaný otop +# 3. Systémově nainstalovaný otop if [ -x "/usr/local/bin/otop" ]; then exec "/usr/local/bin/otop" "$@" fi -# 3. Stažení binárky pokud chybí -ARCH="$(uname -m)" +# 4. Automatické stažení pro x86_64 pokud chybí if [ "$ARCH" = "x86_64" ]; then - echo "[otop] Stahuji předkompilovanou binárku otop-x86_64..." - mkdir -p "$HOME/.local/bin" - if curl -sL https://xn--peek-h6a.com/otop-x86_64 -o "$HOME/.local/bin/otop" || curl -sL http://91.139.118.43/otop-x86_64 -o "$HOME/.local/bin/otop"; then - chmod +x "$HOME/.local/bin/otop" - exec "$HOME/.local/bin/otop" "$@" + mkdir -p "$HOME/bin/arch/x86_64" + if curl -sL https://xn--peek-h6a.com/otop-x86_64 -o "$HOME/bin/arch/x86_64/otop" || curl -sL http://91.139.118.43/otop-x86_64 -o "$HOME/bin/arch/x86_64/otop"; then + chmod +x "$HOME/bin/arch/x86_64/otop" + exec "$HOME/bin/arch/x86_64/otop" "$@" fi fi -# 4. Fallback na standardní btop +# 5. Fallback na standardní btop if command -v btop >/dev/null 2>&1; then exec btop "$@" fi -echo "Chyba: otop ani btop nebyl nalezen." >&2 +echo "Chyba: otop ani btop nebyl nalezen pro architekturu $ARCH." >&2 exit 1