Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod update script should only run if new or deleted files, not if files changed #63

Closed
rhgills opened this issue Aug 31, 2013 · 4 comments

Comments

@rhgills
Copy link
Contributor

rhgills commented Aug 31, 2013

No description provided.

@jasperblues
Copy link
Member

bump? This is done?

@rhgills
Copy link
Contributor Author

rhgills commented Dec 17, 2013

Just looked into it.

You can specify as an option to find to look for added files. The problem is that (at least for AppCode), any change to a file will update the file creation time to the current time. Also, the pod update script right now doesn't detect deletions. I believe in order to do that we would have to store a list of the previous source files we know about and check for deletions/additions based on file names. But then it would be confused by renames.

Maybe we could hook into git to piggyback on its detection of added and deleted files?

@jasperblues
Copy link
Member

Would the following work?

  • ls the directory contents - producing a checksum. save it.
  • Next run ls the directory contents, compare checksum with last checksum.

I have some code to do this somewhere.

@jasperblues
Copy link
Member

Ah, the script I had lying around from before actually checks the contents to see if they've changed - it used a command called md5deep, available via MacPorts (and brew? )

But for this requirement, how about:

#Create a checksum for the current directory, will result in a new check-sum if 
#files have been added or removed
find . | awk '{print $1}' | md5

rhgills added a commit to rhgills/Typhoon that referenced this issue Jan 1, 2014
@rhgills rhgills closed this as completed in 6ea15a7 Jan 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants