diff options
-rw-r--r-- | .github/workflows/symlinks.yml | 18 | ||||
-rwxr-xr-x | Makefile.in | 4 | ||||
-rwxr-xr-x | svgtopng/pngtheme.sh | 5 |
3 files changed, 25 insertions, 2 deletions
diff --git a/.github/workflows/symlinks.yml b/.github/workflows/symlinks.yml new file mode 100644 index 00000000..c58fac5f --- /dev/null +++ b/.github/workflows/symlinks.yml @@ -0,0 +1,18 @@ +name: "Check symlinks" + +on: [pull_request, push] + +jobs: + check: + name: Check for dangling symlinks + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Check symlinks + shell: bash + run: | + sudo apt install -y libgtk-3-dev --no-install-recommends + ./configure + make test diff --git a/Makefile.in b/Makefile.in index 3f5f0456..0565aa11 100755 --- a/Makefile.in +++ b/Makefile.in @@ -30,12 +30,14 @@ icon-caches: gtk-update-icon-cache -f $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-darker gtk-update-icon-cache -f $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-darkest -build: builddir $(SUBDIRS) +test: builddir $(SUBDIRS) chmod +x ./svgtopng/pngtheme.sh @./svgtopng/pngtheme.sh build/elementary-xfce @./svgtopng/pngtheme.sh build/elementary-xfce-dark @./svgtopng/pngtheme.sh build/elementary-xfce-darker @./svgtopng/pngtheme.sh build/elementary-xfce-darkest + +build: test @echo == Optimizing all icon pngs @find build -type f -iname '*.png' | xargs optipng -strip all -silent diff --git a/svgtopng/pngtheme.sh b/svgtopng/pngtheme.sh index 6f536855..28474677 100755 --- a/svgtopng/pngtheme.sh +++ b/svgtopng/pngtheme.sh @@ -28,4 +28,7 @@ find "$icondir" -iname '*.svg' -not \( -wholename "*/scalable/*" -o -wholename " #ignore the output if the theme depends on another one (e.g. elementary-xfce-dark needs to be converted before elementary-xfce) echo " * Checking dangling symlinks" -find -L "$icondir" -type l -exec /bin/ls -go {} \; +if find -L "elementary-xfce" -type l -exec /bin/ls -go {} \; | grep .; then + echo "Found some dangling symlinks, please go fix those."; + exit 1; +fi |