Code Monkey home page Code Monkey logo

deploy-org's Introduction

Deploy Emacs, Org, and ESS

https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg

https://github.com/phrb/deploy-org/actions/workflows/ubuntu_20042_lts.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/ubuntu_2104.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/debian_109.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/debian_11.yml/badge.svg

Use the Emacs configuration files in this repository to deploy Emacs, org, and ESS in your system. Tested in different Linux distributions using Docker.

Quickstart

To install this configuration in your system directly, backup your init.el file, then run:

git clone https://github.com/phrb/deploy-org.git
cd deploy-org
sudo ./install/install.sh -i
./install/install.sh -e -t

You should check the Emacs and org versions, and you should see a PDF file produced. message, indicating that org succesfully compiled the test file org/journal/journal.org to pdf. Tests are implemented in the install/install.sh script.

The install/install.sh script will attempt to identify your system and run the correct shell script for it. If it fails for your system, please submit an issue.

Install Script and Docker

The script’s options are:

./install/install.sh -h
Usage: ./install/install.sh [OPTION]
	-i, --install	Install dependencies (requires sudo privileges)
	-e, --emacs	Copy "init.el" to user home [/home/phrb/.emacs.d/]
	-t, --test	Test user configuration [/home/phrb/.emacs.d/init.el]
	-h, --help	Print this message

You can check the status on your machine of each supported system using Docker. To check the status for Ubuntu 20.04.2 LTS, for example, run:

cd docker/ubuntu_20042_lts
sudo docker build .

Contributing

To contribute, please fork the repository, create a new branch with your changes, and submit a pull request to the main branch.

Adding Support for a New Distribution

First, check the values of the NAME, VERSION, and PRETTY_NAME listed on the /etc/os-release file of the distribution you want to add support to:

OS_NAME=$(cat /etc/os-release | grep "^NAME=" | cut -d= -f2 | cut -d'"' -f2)
OS_VERSION=$(cat /etc/os-release | grep "^VERSION=" | cut -d= -f2 | cut -d'"' -f2)
OS_PRETTY=$(cat /etc/os-release | grep "^PRETTY_NAME=" | cut -d= -f2 | cut -d'"' -f2)

echo "[$OS_NAME] [$OS_VERSION] [$OS_PRETTY]"

Add these variables to the case structure in the check_os_eval function in the setup_os.sh script. Use the PRETTY_NAME, or any other variable in /etc/os-release, only if VERSION is empty. This way, the script can launch the proper function in a user’s system.

Write a function with the configuration for the target distribution. If it’s a Debian- or Ubuntu-based system, chances are the Ubuntu functions in setup_os.sh will just work. For example, these are the functions for Ubuntu 21.04, Debian 10.9, and Debian 11:

function ubuntu_2104() {
    ubuntu_20042_lts
}

function debian_109() {
    ubuntu_20042_lts
}

function debian_11() {
    ubuntu_20042_lts
}

Add your function call to the case structure.

Now, write a Dockerfile for your distribution and a corresponding GitHub action. Use the examples in the docker and workflows directories as starting points.

Make sure that the tests for your distribution pass, and that your changes don’t break support for any other distribution.

Finally, submit a pull request with the Support New Distribution template.

Updating init.org

Make your changes to init.org, tangle blocks to init.el with C-c C-v C-t, and make sure that your changes don’t break support for all distributions.

Finally, submit a pull request with the Update init.org template.

Linux Distributions we Wish to Support

Didn’t see yours, or one you want? Submit an issue!

  • [ ] Mint
  • [ ] Fedora
  • [ ] NixOS
  • [ ] Guix
  • [ ] Kubuntu
  • [ ] Older Ubuntu versions
  • [ ] Manjaro
  • [ ] Arch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.