You are not logged in.

#1 2021-10-03 17:35:25

silverhikari
Member
Registered: 2018-09-09
Posts: 15

can you use shopt in a pkgbuild?

does shopt work in pkgbuilds as i am using the "shopt -s extglob" command along with " cp -r !(dictionaries|en.mse-locale|ru.mse-locale) "$pkgdir/usr/share/magicseteditor/data" " to separate some files from the cp but when i run the build i get " line 27: syntax error near unexpected token `(' "

Offline

#2 2021-10-04 08:44:50

a821
Member
Registered: 2012-10-31
Posts: 381

Re: can you use shopt in a pkgbuild?

Where do you set 'shopt -s extglob'? it doesn't work if it's set inside 'package()', but it works if set outside.


I have not idea if using shopt is considered good/bad practice, but a couple of official packages use it, eg, python, python-pip, ghc. (though I've been told that official PKGBUILD don't always follow good practice smile)

Offline

Board footer

Powered by FluxBB