[aur-general] Filenames with "_" in it
I have one package[1] in AUR which has a "_" in the original file name. When I put source=(http://downloads.sourceforge.net/bibcursed/$pkgname_$pkgver.tgz) in the PKGBUILD, it won't work. When I put an \ before the _ it works but on the AUR page this \ will also show up and break the link to the original file. Thomas
2009/6/1 Thomas Bohn <thomas@bohnomat.de>:
I have one package[1] in AUR which has a "_" in the original file name. When I put
source=(http://downloads.sourceforge.net/bibcursed/$pkgname_$pkgver.tgz)
in the PKGBUILD, it won't work. When I put an \ before the _ it works but on the AUR page this \ will also show up and break the link to the original file.
Try source=(http://downloads.sourceforge.net/bibcursed/${pkgname}_${pkgver}.tgz) -- Abhishek
On 2009-06-01 17:10 +0530, Abhishek Dasgupta wrote:
Try source=(http://downloads.sourceforge.net/bibcursed/${pkgname}_${pkgver}.tgz)
The {} did the trick, thanks for the quick help. Thomas
2009/6/1 Thomas Bohn <thomas@bohnomat.de>:
I have one package[1] in AUR which has a "_" in the original file name. When I put
source=(http://downloads.sourceforge.net/bibcursed/$pkgname_$pkgver.tgz)
in the PKGBUILD, it won't work. When I put an \ before the _ it works but on the AUR page this \ will also show up and break the link to the original file.
Thomas
If you have underscores next to variable names, shouldn't you use {} brackets? Because since underscores are accepted in bash variable names, this situation can be ambiguous. So use it like: source=(http://downloads.sourceforge.net/bibcursed/${pkgname}_${pkgver}.tgz) (And using brackets is generally a good idea, I think...) Nevertheless, probably it worth checking out the replacement of \ on AUR, I'll try when I have some time... Cheers, Greg
If you use an editor with syntax highlighting, these things are easily spotted. Vim always fixes my mistakes and typos like this.
Thomas Bohn wrote:
I have one package[1] in AUR which has a "_" in the original file name. When I put
source=(http://downloads.sourceforge.net/bibcursed/$pkgname_$pkgver.tgz)
in the PKGBUILD, it won't work. When I put an \ before the _ it works but on the AUR page this \ will also show up and break the link to the original file.
Adjust your source to: source=(http://downloads.sourceforge.net/bibcursed/${pkgname}_$pkgver.tgz) Allan
participants (5)
-
Abhishek Dasgupta
-
Allan McRae
-
Gergely Imreh
-
Ray Rashif
-
Thomas Bohn