Live data from Hacker News

Show HN: A GitHub Repo Local Backup CLI Utility

github.com

1–8 of 8 posts

Re: Show HN: A GitHub Repo Local Backup CLI Utility

#5
post #4

Earlier quoted context omitted.

It isn't needed

I spotted sudo in the last line of the Readme.

Oh, I thought you were talking about running the program. That entire line is for the purpose of removing everything in the current directory except the source files, such as the 'repositories' folder (which is where the program stores downloaded repositories by default) for cleanup purposes.

As for why sudo is there, whenever the download directory for the repositories is rm'd for cleanup, I get a confirmation prompts for each subdirectory:

rm -r repositories/ rm: descend into write-protected directory 'repositories/'? y rm: descend into write-protected directory 'repositories/calculator' ...

So I just use sudo to skip said prompts and documented it.

Re: Show HN: A GitHub Repo Local Backup CLI Utility

#6
post #4

Earlier quoted context omitted.

I spotted sudo in the last line of the Readme.

Oh, I thought you were talking about running the program. That entire line is for the purpose of removing everything in the current directory except the source files, such as the 'repositories' folder (which is where the program stores downloaded repositories by default) for cleanup purposes. As for why sudo is there, whenever the download directory for the repositories is rm'd for cleanup, I get a confirmation promp…

It is very unlikely that any of this needs elevated privileges. What is the ownership and permission of the directories you can’t remove?

Edit: rm -rf instead of sudo rm -r should work

Re: Show HN: A GitHub Repo Local Backup CLI Utility

#7
post #6

Earlier quoted context omitted.

Oh, I thought you were talking about running the program. That entire line is for the purpose of removing everything in the current directory except the source files, such as the 'repositories' folder (which is where the program stores downloaded repositories by default) for cleanup purposes. As for why sudo is there, whenever the download directory for the repositories is rm'd for cleanup, I get a confirmation promp…

It is very unlikely that any of this needs elevated privileges. What is the ownership and permission of the directories you can’t remove? Edit: rm -rf instead of sudo rm -r should work

Hey, thanks man! I'll update the README

Re: Show HN: A GitHub Repo Local Backup CLI Utility

#8
post #6

Earlier quoted context omitted.

It is very unlikely that any of this needs elevated privileges. What is the ownership and permission of the directories you can’t remove? Edit: rm -rf instead of sudo rm -r should work

Hey, thanks man! I'll update the README

Another neat way IMO is to provide a Makefile with a clean target.