forked from artix/artools
Compare commits
9 Commits
ci-complet
...
no-shallow
| Author | SHA1 | Date | |
|---|---|---|---|
| 52e51b2b49 | |||
| 52617ccb58 | |||
| 5165e7d9b2 | |||
| 335499b83e | |||
| f7a597f9a3 | |||
| 7b89b421d3 | |||
|
caf3a3a24e
|
|||
| 74a9d0296b | |||
| c40718c027 |
@@ -38,3 +38,6 @@
|
||||
|
||||
# default jenkins agents
|
||||
# AGENTS=(orion taurus)
|
||||
|
||||
# whether to include custom maintainer line when importing from arch
|
||||
# PATCH_MAINTAINER=yes
|
||||
|
||||
@@ -12,7 +12,7 @@ PATCHDIR=${PATCHDIR:-"${WORKSPACE_DIR}/artix-patches"}
|
||||
update_patches(){
|
||||
if [[ ! -d "${PATCHDIR}" ]]; then
|
||||
# ${GIT_ORG}
|
||||
if ! git clone --depth=1 "${GIT_SSH}:artix/artix-patches.git" "${PATCHDIR}"; then
|
||||
if ! git clone "${GIT_SSH}:artix/artix-patches.git" "${PATCHDIR}"; then
|
||||
>&2 echo 'failed to clone %s' "${PATCHDIR}"
|
||||
fi
|
||||
else
|
||||
@@ -28,13 +28,26 @@ patch_pkgbase(){
|
||||
sed -e 's|https://www.archlinux.org/|https://www.artixlinux.org/|' \
|
||||
-e 's|(Arch Linux)|(Artix Linux)|' \
|
||||
-e 's|arch-meson|artix-meson|' \
|
||||
-e 's|# Maintainer:|# Contributor:|' \
|
||||
-i PKGBUILD
|
||||
if [ -n "${PACKAGER}" ]; then
|
||||
|
||||
if [ "${PATCH_MAINTAINER}" = "yes" ] && [ -n "${PACKAGER}" ]; then
|
||||
sed -e 's|# Maintainer:|# Contributor:|' -i PKGBUILD
|
||||
printf '%s\n%s\n' "# Maintainer: ${PACKAGER}" "$(cat "PKGBUILD")" >"PKGBUILD"
|
||||
fi
|
||||
|
||||
if [ -d "${patches}" ]; then
|
||||
if [ -f "${patches}/env.txt" ]; then
|
||||
while read -r line; do
|
||||
IFS="=" read -r key value <<< "$line"
|
||||
if [[ -z "${key}" ]] || [[ -z "${value}" ]]; then
|
||||
die "Invalid key value pair in env.txt"
|
||||
fi
|
||||
if declare -p "${key}" &> /dev/null; then
|
||||
die "Environment variable %s already exists." "${key}"
|
||||
fi
|
||||
export "${key}=${value}"
|
||||
done < "${patches}/env.txt"
|
||||
fi
|
||||
for file in "${patches}"/*; do
|
||||
if [ -x "${file}" ]; then
|
||||
echo "$> ${name}/$(basename "${file}")"
|
||||
|
||||
Reference in New Issue
Block a user