File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ OLDPWD="${PWD}"
3333SCRIPT_PATH=" ${BASH_SOURCE[0]} "
3434SCRIPT_DIR=" $( cd " $( dirname " ${SCRIPT_PATH} " ) " & > /dev/null && pwd ) "
3535GIT_DIR=" $( dirname " $( dirname " ${SCRIPT_DIR} " ) " ) "
36- export DIR=" ${SCRIPT_DIR} /report"
36+ DIR=" ${SCRIPT_DIR} /report"
37+ TIMESTAMP=" $( date ' +%Y-%m-%d_%H-%M-%S' ) "
3738
3839if [ -z " ${DIR} " ]; then
3940 echo " Could not configure directory variable: ${DIR} "
@@ -106,6 +107,7 @@ if [ "$(ls -A $DIR)" ]; then
106107fi
107108mkdir -p " ${DIR} /hdparm" " ${DIR} /smartctl"
108109cp " ${SCRIPT_PATH} " " ${DIR} "
110+ sed " s/HOST/$( hostname) /g; s/TIMESTAMP/${TIMESTAMP} /g" " ${SCRIPT_DIR} /report_readme_template.txt" > " ${DIR} /README.txt"
109111
110112# Basic info
111113echo " Basic info:"
351353
352354if [ " ${REPORT} " = true ]; then
353355 # Packaging
354- 7zr a -mx=9 " ${DIR} _$( date ' +%Y-%m-%d_%H-%M-%S ' ) .7z" " ${DIR} "
356+ 7zr a -mx=9 " ${DIR} _${TIMESTAMP} .7z" " ${DIR} "
355357 echo " The report is ready."
356358fi
Original file line number Diff line number Diff line change 1+ This report was created on HOST at TIMESTAMP using Mika's reporting script:
2+ https://github.com/AgenttiX/linux-scripts/blob/master/testing/report.sh
You can’t perform that action at this time.
0 commit comments