Skip to content

Commit

Permalink
One file to install icemacs
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzo44 committed Feb 22, 2024
1 parent f7cbcd4 commit 06d7059
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
15 changes: 0 additions & 15 deletions init.el

This file was deleted.

21 changes: 21 additions & 0 deletions setup-icemacs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Define the paths
EMACS_DIR="$HOME/.emacs.d"
INIT_ORG="$EMACS_DIR/bwoah.org"
INIT_EL="$EMACS_DIR/init.el"

# Check if init.el exists
if [ ! -f "$INIT_EL" ]; then
echo "Generating init.el from bwoah.org..."
# Use Emacs in batch mode to tangle init.org
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$INIT_ORG\" \"$INIT_EL\")"
echo "init.el generated. Starting package installation..."

# Start Emacs in batch mode to install packages
emacs --batch -l "$INIT_EL" --eval "(package-refresh-contents)" --eval "(package-install-selected-packages)" --eval "(kill-emacs)"

echo "Package installation complete. Icemacs is ready!"
else
echo "init.el already exists."
fi

0 comments on commit 06d7059

Please sign in to comment.