Add scouts honor escape hatch for source embedding

This commit is contained in:
Justine Tunney 2020-06-15 19:01:28 -07:00
parent c91b3c5006
commit b4269930f7
547 changed files with 1516 additions and 944 deletions

17
tool/scripts/configure-emacs.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
if ! [ -e ape/ape.S ]; then
echo please cd to cosmopolitan root directory >&2
exit 1
fi
COSMOPOLITAN="$PWD"
EMACSCONFIGS="$HOME/.emacs.d/init.el"
[ -e "$EMACSCONFIGS" ] || EMACSCONFIGS="$HOME/.emacs"
cat >>"$EMACSCONFIGS" <<EOF # idempotent
(let ((path "$COSMOPOLITAN/tool/emacs"))
(when (file-directory-p path)
(add-to-list 'load-path path)
(require 'cosmo)))
EOF

6
tool/scripts/grep Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
exec /usr/bin/grep \
--exclude-dir=o \
--exclude-dir=gcc \
--exclude-dir=.git \
"$@"

15
tool/scripts/install-emacs.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
# installs emacs version w/ working (replace-buffer-contents)
# it's sooooo worth it due to clang-format-10 working so well
set -ex
sudo apt build-dep emacs
cd "$HOME"
export CFLAGS="-O2"
rm -rf emacs-26.3
wget http://mirrors.kernel.org/gnu/emacs/emacs-26.3.tar.gz
tar xf emacs-26.3.tar.gz
cd emacs-26.3
./configure
make -j8
sudo make install
rm -f ../emacs-26.3.tar.gz