mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-02 13:08:53 +02:00
Add a script that lints all recipes added/changed since origin/HEAD.
This commit is contained in:
14
lint-new-recipes.sh
Executable file
14
lint-new-recipes.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Lints all the recipes created / modified since upstream HEAD.
|
||||||
|
git remote add real_origin https://github.com/haikuports/haikuports.git || true
|
||||||
|
git fetch real_origin
|
||||||
|
|
||||||
|
files=$(git diff $(git rev-parse --abbrev-ref HEAD) real_origin/master --numstat | awk '{print $3}')
|
||||||
|
for file in $files; do
|
||||||
|
if [ -e "$file" ] && [[ "$file" == *recipe ]]; then
|
||||||
|
baseName=$(basename $file)
|
||||||
|
portName=${baseName::-7}
|
||||||
|
haikuporter $@ --lint $portName
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user