2026-04-26 22:30:25 +00:00
|
|
|
# === Claude Code for Termux - .bashrc additions ===
|
|
|
|
|
# Append these lines to your ~/.bashrc
|
|
|
|
|
|
|
|
|
|
# Node-gyp / native compilation config
|
|
|
|
|
export CFLAGS="-I$PREFIX/include"
|
|
|
|
|
export LDFLAGS="-L$PREFIX/lib"
|
|
|
|
|
export CC=clang
|
|
|
|
|
export CXX=clang++
|
|
|
|
|
export npm_config_nodedir=$PREFIX
|
|
|
|
|
|
|
|
|
|
# Add local bin to PATH (for clauded, claude-check-env, etc.)
|
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
# Prevent Claude Code auto-updater (enforced at shell level too)
|
|
|
|
|
export DISABLE_AUTOUPDATER=1
|
2026-06-16 12:58:57 +00:00
|
|
|
|
|
|
|
|
# === Optional: helper aliases for samba + mDNS services ===
|
|
|
|
|
# Only useful if you set up smbd and mdns-publish (see docs/04-samba.md, docs/03-ssh-mdns-tailscale.md).
|
|
|
|
|
|
|
|
|
|
alias smb-start='smbd -D -s ~/.config/samba/smb.conf 2>>~/.config/samba/samba-startup.log && echo "Samba started on port 4450"'
|
|
|
|
|
alias smb-stop='pkill smbd && echo "Samba stopped"'
|
|
|
|
|
alias smb-restart='pkill smbd 2>/dev/null; sleep 1; smbd -D -s ~/.config/samba/smb.conf 2>>~/.config/samba/samba-startup.log && echo "Samba restarted"'
|
|
|
|
|
alias smb-status='pgrep -a smbd && echo "Port: 4450" || echo "Samba is not running"'
|
|
|
|
|
alias smb-log='tail -50 ~/.config/samba/samba.log'
|
|
|
|
|
|
|
|
|
|
alias mdns-status='pgrep -af mdns-publish || echo "mDNS publisher is not running"'
|
|
|
|
|
alias mdns-restart='pkill -f mdns-publish; sleep 1; nohup python ~/.local/bin/mdns-publish.py >>~/.cache/mdns.log 2>&1 & disown && echo "mDNS restarted"'
|
|
|
|
|
alias mdns-stop='pkill -f mdns-publish && echo "mDNS stopped"'
|
|
|
|
|
|
|
|
|
|
# === Optional: auto-start samba + mDNS on shell login ===
|
|
|
|
|
# Uncomment the block below if you want services up automatically.
|
|
|
|
|
# Failures are logged (NOT silenced) — silent failures after a tar restore are the worst class of bug.
|
|
|
|
|
#
|
|
|
|
|
# mkdir -p ~/.cache
|
|
|
|
|
# pgrep -x smbd >/dev/null 2>&1 || smbd -D -s ~/.config/samba/smb.conf 2>>~/.config/samba/samba-startup.log
|
|
|
|
|
# pgrep -f "mdns-publish" >/dev/null 2>&1 || nohup python ~/.local/bin/mdns-publish.py >>~/.cache/mdns.log 2>&1 & disown
|