2026-07-26 20:07:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
# OptMem installer. Run it again to update: it only replaces the tool, and
|
|
|
|
|
# `memo init` never touches memories that already exist.
|
|
|
|
|
#
|
|
|
|
|
# curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/install.sh | sh
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
DIR="$HOME/.optmem"
|
|
|
|
|
|
2026-07-26 21:34:25 +02:00
|
|
|
command -v python3 >/dev/null || {
|
|
|
|
|
echo "OptMem is one Python file, and this machine has no python3." >&2
|
|
|
|
|
echo "Install python3, then run this line again." >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-26 20:07:10 +02:00
|
|
|
mkdir -p "$DIR"
|
2026-07-26 20:12:41 +02:00
|
|
|
curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/memo -o "$DIR/memo.new"
|
|
|
|
|
mv "$DIR/memo.new" "$DIR/memo"
|
2026-07-26 20:07:10 +02:00
|
|
|
chmod +x "$DIR/memo"
|
|
|
|
|
|
|
|
|
|
exec "$DIR/memo" init
|