From 790b7ec9f9a5e42b08d730a5218bbd6d7624a69c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 10 Jun 2012 14:51:54 +0000 Subject: [PATCH] Some work on making things faster. No functional changes. --- functions.util | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/functions.util b/functions.util index 694c7a40..0b646f7d 100644 --- a/functions.util +++ b/functions.util @@ -75,6 +75,12 @@ function basename() { echo "${1##*/}" } +function touch() { + local file=${1} + + : > ${file} +} + function enabled() { local param=${1} @@ -82,31 +88,38 @@ function enabled() { } function mac_generate() { - local mac=() + # Get a bunch of random hex digits + # and remove all dashes from the input. + local random=$(