Giter VIP home page Giter VIP logo

conf.sh's Introduction

conf.sh: configuration set up targeting POSIX-like shells.

Build Status

What?

For a long time I used puppet to manage my dotfiles. Then for a while I used Ansible. But man, those are some heavyweight approaches. And (back then, at least) cross-platform support was iffy or inconsistent.

So I wrote this. It's intended to work anywhere you have have a POSIX shell, and to work really well anywhere you have a POSIX shell and git.

Requirements

Older systems may only provide command -v as part of User Portability Utilities as it was flagged in The Open Group Base Specifications Issue 6/ POSIX.1-2004, by The Open Group Base Specifications Issue 7/POSIX.1-2008 it was standard. Some versions of checkbashisms will complain about this, however we check for this extension early on in the script.

Usage

Usage: sh conf.sh [-Uvulands] [-m "module module ..."]

      -U            Update all git submodules
      -u            List projects provided as git submodules
      -m            Run all listed modules
      -l            List available modules
      -n            Avoid making changes and echo commands instead
      -v            Be verbose
      -s            Sync all live configs to their repository origin
      -a            Install all modules
      -nv           Be verbose, don't change anything and show diffs
      -d            Extract documentation from this script

Examples:
  Install the vim, tmux and ssh modules:
    ./conf.sh -m "vim tmux ssh"

  Update all git submodules and install vim and tmux configs:
    ./conf.sh -Um "vim tmux"

  Discover what has changed between a local config and the repository copy:
    ./conf.sh -snvm "tmux ssh zsh"

  Synchronize the files in the repository with the live configs:
    ./conf.sh -s "tmux ssh zsh"

Tested Shells

  • bash (and POSIX compliant mode) 4.3.39(1)-release
  • BusyBox v1.23.2
  • dash 0.5.8.2
  • ksh ABIJM 93v-
  • mksh @(#)MIRBSD R50
  • pdksh @(#)PD v5.2.14
  • yash 2.37

TODO

  • Encryption of certain configs
  • Automatically set up config submodule repository
  • Automatically construct a "configs" directory hierarchy
  • Optional self-installation to $PREFIX
  • Roll up self and configs into a single archive for easy transport
  • Testing with: ash, zsh
  • More unit testing

conf.sh's People

Contributors

maxrp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.