I created a pet package that needs a pinstall.sh file to copy the right localized file to /root: Depending on the actual locale used by the system, this file should be copied from 'myapp/menus/en/' or 'myapp/menus/fr/' directory. ...Should be but is unfortunately not!
Code: Select all
cp -f ${SOURCE}/menus/"${LANG:0:2}"/.jwmrc-tray_3in1 /root/.jwmrc-tray;
Why this C directory when I should get 'en' or 'fr' from the variable ${LANG:0:2}? Running the pinstall.sh alone after installation, the right directory is identified and the right file correctly copied to root!cannot stat /usr/local/myapp/menu/C/.jwmrc-tray_3in1 not such a file... etc.
What's going wrong Doctor?
Thank you!