difference between using 'install' or plain 'cp' when writing AUR packages
can someone explain to me which one to use when writing PKGBUILDS. for example when copying a folder in package {} should I just use something like 'cp -r' or 'install -dm' ? What is the difference?
About this post
- Posted
- Archived
- Score
- 36 · 100% up
- Kind
- Text
- ID
- 22avoa
9 comments
Use install. The difference is that install unlinks any existing files before copying. This is important because the files you're updating could be running.
Deleted before we saved it.
That is technically incorrect, since
makepkgdoes not use a chroot. What's true is that it doesn't write to the system directly.AFAIK, The main advantage of install is it allows you to specify permissions. It might also create directories as needed (like mkdir -p) Personally, I would rather just use mkdir, cp, and chmod - but I don't think it really matters
You can specify permissions with mkdir.
Did you look at the man page?