mirror of https://github.com/Nheko-Reborn/nheko
Merge pull request #58 from zapashcanon/sh
improve shell scripts and update .gitignore. Thanks @zapashcanonpull/60/head
commit
e1457d5c7a
@ -1,14 +1,15 @@ |
||||
#!/usr/bin/env bash |
||||
#!/usr/bin/env sh |
||||
|
||||
# Runs the Clang Formatter |
||||
# Return codes: |
||||
# - 1 there are files to be formatted |
||||
# - 0 everything looks fine |
||||
|
||||
set -o errexit |
||||
set -o pipefail |
||||
set -o nounset |
||||
set -eu |
||||
|
||||
FILES=`find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)` |
||||
FILES=$(find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)) |
||||
|
||||
clang-format -i $FILES && git diff --exit-code |
||||
for f in $FILES |
||||
do |
||||
clang-format -i "$f" && git diff --exit-code |
||||
done; |
||||
|
@ -1,29 +1,30 @@ |
||||
#!/usr/bin/env bash |
||||
#!/usr/bin/env sh |
||||
|
||||
set -ex |
||||
set -eux |
||||
|
||||
TAG=`git tag -l --points-at HEAD` |
||||
# unused |
||||
#TAG=$(git tag -l --points-at HEAD) |
||||
|
||||
# Add Qt binaries to path |
||||
PATH=/usr/local/opt/qt/bin/:${PATH} |
||||
|
||||
pushd build |
||||
( cd build |
||||
# macdeployqt does not copy symlinks over. |
||||
# this specifically addresses icu4c issues but nothing else. |
||||
ICU_LIB="$(brew --prefix icu4c)/lib" |
||||
export ICU_LIB |
||||
mkdir -p nheko.app/Contents/Frameworks |
||||
find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true |
||||
|
||||
# macdeployqt does not copy symlinks over. |
||||
# this specifically addresses icu4c issues but nothing else. |
||||
export ICU_LIB="$(brew --prefix icu4c)/lib" |
||||
mkdir -p nheko.app/Contents/Frameworks |
||||
find ${ICU_LIB} -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true |
||||
sudo macdeployqt nheko.app -dmg -always-overwrite |
||||
|
||||
sudo macdeployqt nheko.app -dmg -always-overwrite |
||||
|
||||
user=$(id -nu) |
||||
sudo chown ${user} nheko.dmg |
||||
mv nheko.dmg .. |
||||
popd |
||||
user=$(id -nu) |
||||
sudo chown "${user}" nheko.dmg |
||||
mv nheko.dmg .. |
||||
) |
||||
|
||||
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg |
||||
|
||||
if [ ! -z $VERSION ]; then |
||||
mv nheko.dmg nheko-${VERSION}.dmg |
||||
if [ ! -z "$VERSION" ]; then |
||||
mv nheko.dmg "nheko-${VERSION}.dmg" |
||||
fi |
||||
|
Loading…
Reference in new issue