mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
synced 2024-12-17 20:55:27 +00:00
Merge branch 'mlimonci/make-dist' into 'main'
Add new `make dist` target See merge request kernel-firmware/linux-firmware!4
This commit is contained in:
commit
20d250e3e9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
debian/
|
||||
dist/
|
||||
release/
|
||||
|
@ -18,8 +18,12 @@ release:
|
||||
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
when: never
|
||||
- if: $RELEASE_TOKEN
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/*
|
||||
script:
|
||||
- CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'`
|
||||
- git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO"
|
||||
- git tag `date "+%Y%m%d"`
|
||||
- git push --tags
|
||||
- make dist
|
||||
|
11
Makefile
11
Makefile
@ -12,6 +12,14 @@ check:
|
||||
fi
|
||||
@pre-commit run --all-files
|
||||
|
||||
dist:
|
||||
@mkdir -p release dist
|
||||
./copy-firmware.sh release
|
||||
@TARGET=linux-firmware_`git describe`.tar.gz; \
|
||||
cd release && tar -czf ../dist/$${TARGET} *; \
|
||||
echo "Created dist/$${TARGET}"
|
||||
@rm -rf release
|
||||
|
||||
install:
|
||||
install -d $(DESTDIR)$(FIRMWAREDIR)
|
||||
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
||||
@ -23,3 +31,6 @@ install-xz:
|
||||
install-zst:
|
||||
install -d $(DESTDIR)$(FIRMWAREDIR)
|
||||
./copy-firmware.sh --zstd $(DESTDIR)$(FIRMWAREDIR)
|
||||
|
||||
clean:
|
||||
rm -rf release dist
|
||||
|
@ -9,12 +9,16 @@ prune=no
|
||||
# shellcheck disable=SC2209
|
||||
compress=cat
|
||||
compext=
|
||||
quiet=">/dev/null"
|
||||
rdfind_results=/dev/null
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
-v | --verbose)
|
||||
# shellcheck disable=SC2209
|
||||
verbose=echo
|
||||
quiet=
|
||||
rdfind_results=results.txt
|
||||
shift
|
||||
;;
|
||||
|
||||
@ -115,6 +119,12 @@ grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do
|
||||
fi
|
||||
done
|
||||
|
||||
$verbose rdfind -makesymlinks true "$destdir" -outputname $rdfind_results "$quiet"
|
||||
find "$destdir" -type l | while read -r l; do
|
||||
target="$(realpath "$l")"
|
||||
ln -fs "$(realpath --relative-to="$(dirname "$(realpath -s "$l")")" "$target")" "$l"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
# vim: et sw=4 sts=4 ts=4
|
||||
|
Loading…
Reference in New Issue
Block a user