fix errors found by bash -e

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2022-03-03 16:01:33 +01:00
parent 17458c57f1
commit b58720047f
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
11 changed files with 35 additions and 32 deletions

View file

@ -43,7 +43,7 @@ make -j3 PREFIX=$PREFIX
# installation # installation
mkdir -p $PKG mkdir -p $PKG
PREFIX=$PREFIX DOC_DIR=$PREFIX/doc/$PRGNAM DESTDIR=$PKG make install PREFIX=$PREFIX DOC_DIR=$PREFIX/doc/$PRGNAM DESTDIR=$PKG PREFIX=$PKG$PREFIX DOC_DIR=$PKG$PREFIX/doc/$PRGNAM DESTDIR=$PKG make install PREFIX=$PKG$PREFIX DOC_DIR=$PKG$PREFIX/doc/$PRGNAM DESTDIR=$PKG
[ -d $PKG$PREFIX/share/man ] && mv $PKG$PREFIX/share/man $PKG$PREFIX/man [ -d $PKG$PREFIX/share/man ] && mv $PKG$PREFIX/share/man $PKG$PREFIX/man
# correction # correction
@ -52,11 +52,11 @@ chown -R root:root *
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries # # Strip binaries
( cd $PKG # ( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
) # )
# embaumement # embaumement

View file

@ -49,7 +49,7 @@ make install DESTDIR=$PKG
rm $PKG$PREFIX/info/dir rm $PKG$PREFIX/info/dir
mkdir -p $PKG$PREFIX/doc/$PRGNAM mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R test/ doc/ *.md LICENSE $PKG$PREFIX/doc/$PRGNAM cp -R AUTHORS Agenda BUGS BUILD-FROM-SCRATCH COPYING* ChangeLog* INSTALL* NEWS* README* ToDo* test/ doc/ *.md $PKG$PREFIX/doc/$PRGNAM
# correction # correction
cd $PKG cd $PKG

View file

@ -38,7 +38,7 @@ cd $TMP/$PRGNAM
[ "x$VERSION" == "xdevelop" ] && git checkout develop && VERSION=trunk [ "x$VERSION" == "xdevelop" ] && git checkout develop && VERSION=trunk
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION [ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
sed -i 's|git@github.com:|https://github.com/|g' $(grep -l git@ .*) # sed -i 's|git@github.com:|https://github.com/|g' $(grep -l git@ .*)
# configuration # configuration
cmake \ cmake \
@ -62,10 +62,10 @@ find $PKG -name \.git\* -exec rm -fr {} \;
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries # # Strip binaries
cd $PKG # cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# embaumement # embaumement
mkdir -p $PKG/install mkdir -p $PKG/install

View file

@ -48,11 +48,11 @@ chown -R root:root *
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries # # Strip binaries
( cd $PKG # ( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
) # )
# embaumement # embaumement

View file

@ -62,10 +62,10 @@ find $PKG -name \.git\* -exec rm -fr {} \;
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries # # Strip binaries
cd $PKG # cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# embaumement # embaumement
mkdir -p $PKG/install mkdir -p $PKG/install

View file

@ -47,7 +47,7 @@ make install DESTDIR=$PKG
# move doc/ to the appropriate location # move doc/ to the appropriate location
mkdir -p $PKG$PREFIX/doc/$PRGNAM mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp LICENSE* *.md $PKG$PREFIX/doc/$PRGNAM cp *.md $PKG$PREFIX/doc/$PRGNAM
# correction # correction
cd $PKG cd $PKG

View file

@ -46,7 +46,7 @@ cp -R files/* $PKG$PREFIX/share/$PRGNAM
# move doc/ to the appropriate location # move doc/ to the appropriate location
mkdir -p $PKG$PREFIX/doc/$PRGNAM mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R doc/ example/ LICENSE *.md $PKG$PREFIX/doc/$PRGNAM cp -R doc/ examples/ LICENSE *.md $PKG$PREFIX/doc/$PRGNAM
mkdir -p $PKG$PREFIX/man mkdir -p $PKG$PREFIX/man
cp man/i3status-rs.1 $PKG$PREFIX/man cp man/i3status-rs.1 $PKG$PREFIX/man

View file

@ -4,7 +4,7 @@ set -x
PRGNAM=$(basename $(pwd)) PRGNAM=$(basename $(pwd))
# Fetching sources # Fetching sources
VERSION=${VERSION:-1.16.5} VERSION=${VERSION:-1.16.7}
BUILD=1 BUILD=1

View file

@ -65,10 +65,12 @@ cd $PKG$PREFIX/share/$PRGNAM
cp $TMP/$PRGNAM/ROMs/*rom*.bz2 . cp $TMP/$PRGNAM/ROMs/*rom*.bz2 .
find . -name "*.bz2" -exec bunzip2 {} \; find . -name "*.bz2" -exec bunzip2 {} \;
# Cleaning # # Cleaning
# cd $PKG
# find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
cd $PKG cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
[ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \; [ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \;

View file

@ -74,10 +74,11 @@ wget -c -O $PREFIX/share/$PRGNAM/newrpl/newrplfw.bin https://www.hpgcc3.org/down
echo "newrplfw.bin" > $PREFIX/share/$PRGNAM/newrpl/update.scp echo "newrplfw.bin" > $PREFIX/share/$PRGNAM/newrpl/update.scp
EOF EOF
# Cleaning # # Cleaning
# cd $PKG
# find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
cd $PKG cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
[ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \; [ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \;

View file

@ -64,7 +64,7 @@ cd ${PRGNAM}-launcher
VERSION=$(cat client-versions.json | grep -o "[0-9.]*" | sed 'N;s/\n/_/') VERSION=$(cat client-versions.json | grep -o "[0-9.]*" | sed 'N;s/\n/_/')
# Use Slackware-specific installation directories # Use Slackware-specific installation directories
patch -p0 < $REPOSITORY/patch-slackdirs.diff patch -p0 < $CWD/patch-slackdirs.diff
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
@ -93,7 +93,7 @@ install -p -m 0644 subprojects/steam-devices/*.rules $PKG/lib/udev/rules.d/
sed -i -e 's/^KERNEL=="uinput".*/& GROUP="plugdev"/' $PKG/lib/udev/rules.d/60-steam-input.rules sed -i -e 's/^KERNEL=="uinput".*/& GROUP="plugdev"/' $PKG/lib/udev/rules.d/60-steam-input.rules
mkdir -p $PKG/usr/doc/$PRGNAM mkdir -p $PKG/usr/doc/$PRGNAM
cp subprojects/steam-devices/LICENSE $REPOSITORY/SlackBuild $PKG/usr/doc/$PRGNAM/ cp subprojects/steam-devices/LICENSE $PKG/usr/doc/$PRGNAM/
mkdir -p $PKG/install mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc cat <<EOF > $PKG/install/slack-desc