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"
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
echo "ok. packing the archives";
else
@ -63,14 +63,14 @@ else
fi
echo "copying the directories to temporary build directories"
mkdir $RELEASECORE
mkdir "$RELEASECORE"
cp -r $CORE "$RELEASECORE/$RELEASECORE"
cp -r $ADDONS "$RELEASEADDONS"
# delete some unneeded files and directories from the repos
echo "cleaning unneded stuff from the core directory"
( cd $RELEASECORE/$RELEASECORE
( cd "$RELEASECORE/$RELEASECORE" || exit
echo "fetching dependencies with composer"
php7.0 bin/composer.phar install --quiet --no-dev
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"
( cd $RELEASEADDONS
( cd "$RELEASEADDONS" || exit
rm -rf .git .tx
rm -rf .editorconfig .gitattributes .gitignore
)
# create tar archives
echo "creating tar archives"
tar -czf $RELEASECORE.tar.gz -C $RELEASECORE .
tar -czf $RELEASEADDONS.tar.gz -C $RELEASEADDONS .
tar -czf "$RELEASECORE.tar.gz" -C "$RELEASECORE" .
tar -czf "$RELEASEADDONS.tar.gz" -C "$RELEASEADDONS" .
# create SHA256 sum files
echo "calculating SHA256 checksums"
sha256sum $RELEASECORE.tar.gz > $RELEASECORE.tar.gz.sum256
sha256sum $RELEASEADDONS.tar.gz > $RELEASEADDONS.tar.gz.sum256
sha256sum "$RELEASECORE.tar.gz" > "$RELEASECORE.tar.gz.sum256"
sha256sum "$RELEASEADDONS.tar.gz" > "$RELEASEADDONS.tar.gz.sum256"
echo "all done please check the check sums."
cat $RELEASECORE.tar.gz.sum256
sha256sum $RELEASECORE.tar.gz
cat "$RELEASECORE.tar.gz.sum256"
sha256sum "$RELEASECORE.tar.gz"
cat $RELEASEADDONS.tar.gz.sum256
sha256sum $RELEASEADDONS.tar.gz
cat "$RELEASEADDONS.tar.gz.sum256"
sha256sum "$RELEASEADDONS.tar.gz"
echo "cleaning up"
rm -rf $RELEASECORE
rm -rf $RELEASEADDONS
rm -rf "$RELEASECORE"
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
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
echo "Archives not copied to the files server";
exit 0