aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Stepanov Aleksey <blueingreen@bluig.xyz>2025-08-08 07:00:06 +0500
committerLibravatar Stepanov Aleksey <blueingreen@bluig.xyz>2025-08-08 07:00:06 +0500
commita146e538ef1169a0446a6419332e3efba9589c71 (patch)
tree78e868c8c890a422dde0b17690dfa1dd6080b940
parent0e96910b1947d1acc8cfd4223e6d61884328292a (diff)
remove getFileHash function
-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