applied some linting

This commit is contained in:
Tobias Diekershoff 2021-05-15 12:18:51 +02:00
parent 6321ee97f8
commit fb5f66727f

View file

@ -54,7 +54,7 @@ VERSION=$1
RELEASECORE="$CORE-full-$VERSION" RELEASECORE="$CORE-full-$VERSION"
RELEASEADDONS="$ADDONS-$VERSION" RELEASEADDONS="$ADDONS-$VERSION"
read -p " > The repositories are in the state they should be for packing? y/n " CONT read -r -p " > The repositories are in the state they should be for packing? y/n " CONT
if [ "$CONT" = "y" ]; then if [ "$CONT" = "y" ]; then
echo "ok. packing the archives"; echo "ok. packing the archives";
else else
@ -63,14 +63,14 @@ else
fi fi
echo "copying the directories to temporary build directories" echo "copying the directories to temporary build directories"
mkdir $RELEASECORE mkdir "$RELEASECORE"
cp -r $CORE "$RELEASECORE/$RELEASECORE" cp -r $CORE "$RELEASECORE/$RELEASECORE"
cp -r $ADDONS "$RELEASEADDONS" cp -r $ADDONS "$RELEASEADDONS"
# delete some unneeded files and directories from the repos # delete some unneeded files and directories from the repos
echo "cleaning unneded stuff from the core directory" echo "cleaning unneded stuff from the core directory"
( cd $RELEASECORE/$RELEASECORE ( cd "$RELEASECORE/$RELEASECORE" || exit
echo "fetching dependencies with composer" echo "fetching dependencies with composer"
php7.0 bin/composer.phar install --quiet --no-dev php7.0 bin/composer.phar install --quiet --no-dev
rm -rf .git .github .tx tests rm -rf .git .github .tx tests
@ -78,36 +78,36 @@ rm -rf .codecov.yml .drone.yml .editorconfig .gitattributes .gitignore .gitmo
) )
echo "cleaning unneded stuff from the addon directory" echo "cleaning unneded stuff from the addon directory"
( cd $RELEASEADDONS ( cd "$RELEASEADDONS" || exit
rm -rf .git .tx rm -rf .git .tx
rm -rf .editorconfig .gitattributes .gitignore rm -rf .editorconfig .gitattributes .gitignore
) )
# create tar archives # create tar archives
echo "creating tar archives" echo "creating tar archives"
tar -czf $RELEASECORE.tar.gz -C $RELEASECORE . tar -czf "$RELEASECORE.tar.gz" -C "$RELEASECORE" .
tar -czf $RELEASEADDONS.tar.gz -C $RELEASEADDONS . tar -czf "$RELEASEADDONS.tar.gz" -C "$RELEASEADDONS" .
# create SHA256 sum files # create SHA256 sum files
echo "calculating SHA256 checksums" echo "calculating SHA256 checksums"
sha256sum $RELEASECORE.tar.gz > $RELEASECORE.tar.gz.sum256 sha256sum "$RELEASECORE.tar.gz" > "$RELEASECORE.tar.gz.sum256"
sha256sum $RELEASEADDONS.tar.gz > $RELEASEADDONS.tar.gz.sum256 sha256sum "$RELEASEADDONS.tar.gz" > "$RELEASEADDONS.tar.gz.sum256"
echo "all done please check the check sums." echo "all done please check the check sums."
cat $RELEASECORE.tar.gz.sum256 cat "$RELEASECORE.tar.gz.sum256"
sha256sum $RELEASECORE.tar.gz sha256sum "$RELEASECORE.tar.gz"
cat $RELEASEADDONS.tar.gz.sum256 cat "$RELEASEADDONS.tar.gz.sum256"
sha256sum $RELEASEADDONS.tar.gz sha256sum "$RELEASEADDONS.tar.gz"
echo "cleaning up" echo "cleaning up"
rm -rf $RELEASECORE rm -rf "$RELEASECORE"
rm -rf $RELEASEADDONS rm -rf "$RELEASEADDONS"
read -p " > copy the files to git.friendi.ca? y/n " CONT read -r -p " > copy the files to git.friendi.ca? y/n " CONT
if [ "$CONT" = "y" ]; then if [ "$CONT" = "y" ]; then
echo "copying files"; echo "copying files";
scp $RELEASECORE.tar.gz $RELEASECORE.tar.gz.sum256 $RELEASEADDONS.tar.gz $RELEASEADDONS.tar.gz.sum256 git.friendi.ca:/srv/http/ scp "$RELEASECORE.tar.gz" "$RELEASECORE.tar.gz.sum256" "$RELEASEADDONS.tar.gz" "$RELEASEADDONS.tar.gz.sum256" git.friendi.ca:/srv/http/
else else
echo "Archives not copied to the files server"; echo "Archives not copied to the files server";
exit 0 exit 0