2012/6/6 Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-05-08 14:42, Jesse Juhani Jaara wrote:
ti, 2012-05-08 kello 18:16 +0200, Jorge Barroso kirjoitti: <snip> All that could be simplified into --------------------------------------- 1. cd "${srcdir}" 2. tar xf data.tar.gz 3. mkdir -p "${pkgdir}/usr/" 4. cp -r "${srcdir}/./usr/local/bin" "${pkgdir}/usr/bin" 5. cp -r "${srcdir}/./usr/share" "${pkgdir}/usr/share" 6. 7. chmod +x "${pkgdir}/usr/bin"/* 8. sed 's|usr/local|usr|' -i "${pkgdir}/usr/bin"/* 9. sed 's|usr/local|usr|' -i "${pkgdir}/usr/share/applications/LDM.desktop" --------------------------------------- <snip>
Instead of mkdir, cp and chmod, use "install -D -m 755 path/to/source path/to/destination" "-D" creates the directory. "-m" set the file mode (like chmod) See man install for more info.
mmm ok, I'll try with install :D mmm just a question: how could I change the owner (I wnat to say, with that PKGBUILD it installs but the owner of archives is root, so it has no icon and an script to avoid making lmd --reconf doesn't works because it is an extra code that only works running lmd like root, and it conflicts because lmd can't be ran like root, so, in short, what I want it's a bash code to change the owner user of lmd when installing)