aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/edit.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/lib/edit.sh b/lib/edit.sh
index 034670e..df3e259 100755
--- a/lib/edit.sh
+++ b/lib/edit.sh
@@ -46,20 +46,23 @@ function getIdsTask() {
printf '%s\n' "${idsTaskProject[@]}"
}
-function getFileHash() {
- sha256sum "$1" | awk '{print $1}'
-}
-
-function checkFilesHash() {
- local originalHash
- local currentHash
-
- originalHash=$(getFileHash "/tmp/tskw.edit.bak")
- currentHash=$(getFileHash "/tmp/tskw.edit")
-
- if [[ "$originalHash" != "$currentHash" ]]; then
- readarray -t taskStages < <(grep -v "^#" </tmp/tskw.edit)
- else
+#****f* edit.sh/compareTaskFiles
+# NAME
+#
+# compareTaskFiles - сравнивает файлы TMP_TSKW_EDIT и TMP_TSKW_BAK.
+#
+# DESCRIPTION
+#
+# TMP_TSKW_EDIT - файл содержит все шаги которые содержит проект с тегом current.
+# TMP_TSKW_BAK - копия TMP_TSKW_EDIT.
+#
+# USED BY
+#
+# - edit.sh
+# - editStageProject
+#******
+function compareTaskFiles() {
+ if cmp -s "$TMP_TSKW_EDIT" "$TMP_TSKW_BAK"; then
notify "msg-gray" "Этапы проекта не были изменены. Выход..."
exit 0
fi