-
Notifications
You must be signed in to change notification settings - Fork 0
/
preface.sh
executable file
·32 lines (25 loc) · 1.06 KB
/
preface.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
###########################################################
# Everest: a modular hdparm wrapper for power management
# Written by Eiza Stanford / "Charky Barky" / "Bash Sudo"
# preface.sh: logs a major header preceding multiple core.sh calls
###########################################################
###########################################################
# Parameters and File Path
###########################################################
label=$1
workingPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
logPath="$workingPath/log.txt"
###########################################################
# Logging Function
###########################################################
function logRecord {
echo "$1" >> $logPath
}
###########################################################
# Actual Logging / Behavior of Program
###########################################################
echo $'\n\n\n' >> $logPath
logRecord ">>> >>> >>> >>> BEGIN SREAK FOR UPDATE HDPARM"
logRecord " GIVEN LABEL: $label"
logRecord " DATE: $(date)"