Score:0

Is there any cli to detect directory changes between bash script runs?

gu flag
ais

For example I have this command

generate-and-deploy-new-version ./site-directory

and I want to run it only if content of the ./site-directory was changed.

if checkchanges "./site-directory" ; then
  generate-and-deploy-new-version ./site-directory
fi

checkchanges could generate some hash of the directory content, save it in file and check it next time it will run.

vidarlo avatar
ar flag
Do you want to run it every time it's updated, or periodic?
HBruijn avatar
in flag
Integrity checking is relatively expensive and becomes more expensive that larger your deployment becomes so the common approach is to assume that the current version was deployed correctly and hasn't been modified/damaged since deployment ==> then checking for a version string should enough. You then apply some logic `installed_version != latest ; install latest` and `if force-reinstalll == yes ; install latest`
ais avatar
gu flag
ais
@vidarlo I want to run it periodically.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.