For a better, faster, safer user experience: - [ ] **RETAIN A SMOOTH LEARNING CURVE (KISS)** - [x] write out the principles behind the project ([commit](https://github.com/GochoMugo/msu/commit/db7ca81682bd00aedc7fb805d4dbc82a90d8eaf)) - [ ] run tests for all these - [ ] use **printf** instead of **echo** ([why](http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo#65819)) - [ ] use **pushd/popd** over **cd** ([why](http://tuxdiary.com/2014/02/21/pushd-popd/)) - [x] warn user when running as **root** ([commit](https://github.com/GochoMugo/msu/commit/daa4d7945da2eae665ef7dc85a7f2490ebc6b423)) - [ ] ensure variables are set using **set -o nounset** - [x] quote arguments that might have **spaces** - [ ] critical sections should use **traps** - [ ] actions be **atomic** - [x] perform **static analysis** ([commit](https://github.com/GochoMugo/msu/commit/ddda16b9e904b47795c75298c4950dbfacb2dabc)) - [ ] use **[** in place of **[[** for **portability** - [x] use **#!/usr/bin/env bash** over **#!/bin/bash** - [ ] set **magic variables** e.g. for current file, basename, and directory - [ ] use **set -o xtrace** for debugging - [ ] use **set -o pipefail** for errors in pipes - [ ] use **set -o errexit** for exiting when error occurs - [x] avoid using **eval** as much as necessary (used [here](https://github.com/GochoMugo/msu/blob/46c212df8500bdb522e9967e3fa1854a95a4d1fe/lib/console.sh#L129)) ([do a search](https://github.com/GochoMugo/msu/search?utf8=%E2%9C%93&q=eval)) - [x] minimal dependencies (issues: #16) - [x] use semantic versioning - [x] maintain a changelog Useful articles/tools: - [Writing robust shell scripts](http://www.davidpashley.com/articles/writing-robust-shell-scripts/) - [Shellcheck: Static Analysis](https://github.com/koalaman/shellcheck) - [What is the difference between test, [ and [[ ?](http://mywiki.wooledge.org/BashFAQ/031) - [Best Practices for Writing Bash Scripts](http://kvz.io/blog/2013/11/21/bash-best-practices/) - [Keep a Changelog](http://keepachangelog.com/) - [Bash Shell Scripting](https://en.wikibooks.org/wiki/Bash_Shell_Scripting)
For a better, faster, safer user experience:
Useful articles/tools: