Skip to content

Commit 1d731bb

Browse files
Added sha256sum to output of command
1 parent f856fa9 commit 1d731bb

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
**Version Number Format:** `major.minor.patch`
6-
**Release Date Format:** `yyyy-mm-dd`
5+
**Version Number Format:** `major.minor.patch`
6+
**Release Date Format:** `yyyy-mm-dd`
77

88
**Types of Changes:**
99
- **Added** for new features.
@@ -20,11 +20,18 @@ All notable changes to this project will be documented in this file.
2020
`-`
2121

2222

23+
## [0.2.0] - 2020-01-13
24+
25+
### Added
26+
- Added sha256sum to output of `generate_config_info` command.
27+
28+
2329
## [0.1.0] - 2020-01-13
2430

2531
`-`
2632
##
2733

2834

29-
[unreleased]: https://github.com/Taskomater/tasker_config_utils/compare/v0.1.0...HEAD
35+
[unreleased]: https://github.com/Taskomater/tasker_config_utils/compare/v0.2.0...HEAD
36+
[0.2.0]: https://github.com/Taskomater/tasker_config_utils/compare/v0.1.0...v0.2.0
3037
[0.1.0]: https://github.com/Taskomater/tasker_config_utils/releases/tag/v0.1.0

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ The `tasker_config_utils` file should be placed in termux `bin` directory `/data
7373
You may optionally run the script placed in the current directory without setting the ownership and permission by running the command `bash tasker_config_utils`.
7474
If you are not running the script in termux, set the shebang of the script correctly (the first line of the script).
7575

76+
Any full exported tasker config passed to the script must have been generated using the `Data->Backup` Tasker menu option or the `Data Backup` action. The script will not work with `autobackups` since those contain XML nodes that are collapsed to a single line with no indentations. If you have an `autobackup`, then import that into Tasker and export a backup manually again with one of the ways mentioned earlier. This does not apply for exported project, task, profile or scene files.
77+
7678
- **`tasker_config_utils`**
7779

7880
##### Help:
@@ -362,10 +364,10 @@ set verbose level to 1 or 2 to get more info when running tasker_config_utils ge
362364
Check [FAQs_And_FUQs.md](FAQs_And_FUQs.md) file for the **Frequently Asked Questions(FAQs)** and **Frequently Unasked Questions(FUQs)**.
363365
##
364366

367+
365368
### Changelog
366369

367370
Check [CHANGELOG.md](CHANGELOG.md) file for the **Changelog**.
368-
369371
##
370372

371373

tasker_config_utils

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#description: various tasker config utils
1111
#author: agnostic-apollo
1212
#usage: run "bash tasker_config_utils --help"
13-
#date: 20-Jan-2020
13+
#date: 13-Apr-2020
1414
#bash version: 4.0 or higher
1515
#credits: -
1616
#license: MIT License
17-
version=0.1.0
17+
version=0.2.0
1818

1919

2020

@@ -1150,6 +1150,22 @@ tasker_config_utils_generate_config_info() {
11501150
return 1
11511151
fi
11521152

1153+
#find sha256sum of exported_tasker_config
1154+
exported_tasker_config_sha256sum="$(sha256sum "$exported_tasker_config")"
1155+
return_value=$?
1156+
if [ $return_value -ne 0 ]; then
1157+
tasker_config_utils_log_errors "Failed to find sha256sum of exported_tasker_config"
1158+
return $return_value
1159+
fi
1160+
1161+
#remove filename from sha256sum of exported_tasker_config
1162+
exported_tasker_config_sha256sum="$(echo "$exported_tasker_config_sha256sum" | cut -d " " -f 1)"
1163+
return_value=$?
1164+
if [ $return_value -ne 0 ]; then
1165+
tasker_config_utils_log_errors "Failed to remove filename from sha256sum of exported_tasker_config"
1166+
return $return_value
1167+
fi
1168+
11531169
#if generate_config_info_mode is set to "project"
11541170
if [[ "$generate_config_info_mode" == "project" ]]; then
11551171
tasker_config_utils_log 1 "project_name = \"$project_name\""
@@ -1363,6 +1379,7 @@ tasker_config_utils_generate_config_info() {
13631379
export_info=$'\n\n'"## Export Info:"
13641380
export_info+=$'\n**Tasker Version:** `'"$tasker_version"'` '
13651381
export_info+=$'\n**Timestamp:** `'"$timestamp"'` '
1382+
export_info+=$'\n**sha256sum:** `'"$exported_tasker_config_sha256sum"'` '
13661383

13671384
profiles_name_list=$'\n\n'"## Profile Names:"
13681385
scenes_name_list=$'\n\n'"## Scene Names:"

0 commit comments

Comments
 (0)