This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
MYSQL_DIR=/var/backups/mysql | |
ATTIC_DIR=/var/backups/attic | |
BACKUP_NAME=tip1.attic | |
BACKUP_SOURCES="/etc /home /usr/share/nginx ${MYSQL_DIR}" | |
REMOTE_DEST="backuptip1@scout.yoyo.org" | |
echo "=================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' R implementation of `cond` from Lisp | |
#' allows for arbitrary numbers of conditionals without ugly nested if statements | |
#' conditionals are entered as pairs of expressions (clauses), | |
#' first the expression to be evaluated and second the return value if the expression is true | |
#' @param ... an even number of expressions as pairs (see example) | |
#' @param true the `else` expression (Taken from the Lisp (T resultN) see http://www.cis.upenn.edu/~matuszek/LispText/lisp-cond.html) | |
#' @return The paired value of the first true conditional expression or the value of true | |
#' @examples | |
#' x <- runif(1) | |
#' cond(x < 0.2, "lower tail", |