shellcheck fixes
This commit is contained in:
parent
2fc888c924
commit
3190e6268c
18
rpm/build
18
rpm/build
|
@ -1,21 +1,21 @@
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
if [ -e ${RPM_BUILD_ROOT}.tmp ]; then
|
if [ -e "${RPM_BUILD_ROOT}".tmp ]; then
|
||||||
rm -r ${RPM_BUILD_ROOT}.tmp
|
rm -r "${RPM_BUILD_ROOT}".tmp
|
||||||
fi
|
fi
|
||||||
mkdir ${RPM_BUILD_ROOT}.tmp
|
mkdir "${RPM_BUILD_ROOT}".tmp
|
||||||
|
|
||||||
# Install the python code
|
# Install the python code
|
||||||
python ../../setup.py install --prefix /usr --no-compile \
|
python ../../setup.py install --prefix /usr --no-compile \
|
||||||
--root ${RPM_BUILD_ROOT}.tmp
|
--root "${RPM_BUILD_ROOT}".tmp
|
||||||
|
|
||||||
# Fix python shebang
|
# Fix python shebang
|
||||||
sed -i 's/#!\/usr\/local\/bin\/python/#!\/usr\/bin\/env python/' \
|
sed -i 's/#!\/usr\/local\/bin\/python/#!\/usr\/bin\/env python/' \
|
||||||
${RPM_BUILD_ROOT}.tmp/usr/bin/FAHControl
|
"${RPM_BUILD_ROOT}".tmp/usr/bin/FAHControl
|
||||||
|
|
||||||
# Make file list
|
# Make file list
|
||||||
FILTERED=$(echo -n ${RPM_BUILD_ROOT}.tmp | sed 's/\//\\\//g')
|
FILTERED=$(echo -n "${RPM_BUILD_ROOT}".tmp | sed 's/\//\\\//g')
|
||||||
find ${RPM_BUILD_ROOT}.tmp -type f | sed "s/$FILTERED//" >filelist.txt
|
find "${RPM_BUILD_ROOT}".tmp -type f | sed "s/$FILTERED//" >filelist.txt
|
||||||
|
|
||||||
# Move the files
|
# Move the files
|
||||||
cp -a ${RPM_BUILD_ROOT}.tmp/* ${RPM_BUILD_ROOT}
|
cp -a "${RPM_BUILD_ROOT}".tmp/* "${RPM_BUILD_ROOT}"
|
||||||
rm -r ${RPM_BUILD_ROOT}.tmp
|
rm -r "${RPM_BUILD_ROOT}".tmp
|
||||||
|
|
Loading…
Reference in New Issue