Skip to content

Commit 20c2236

Browse files
committed
Delete empty lines in description before adding pak sysreqs
1 parent 1554177 commit 20c2236

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

entrypoint.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ SUBDIR="$3"
3737
PKGDIR="${PKGDIR}/${SUBDIR}"
3838
fi
3939

40+
# Prepare DESCRIPTION
41+
DESCRIPTION="${PKGDIR}/DESCRIPTION"
42+
sed '/^[[:space:]]*$/d' -i "${DESCRIPTION}" # deletes empty lines at end of DESCRIPTION
43+
4044
# Get system dependencies
4145
echo "::group::Installing system dependencies"
4246
Rscript --no-init-file -e "buildtools::install_sysdeps('$PKGDIR')"
@@ -52,7 +56,6 @@ elif test -f "$PKGDIR/.prepare"; then
5256
fi
5357

5458
# Normalize DESCRIPTION file
55-
DESCRIPTION="${PKGDIR}/DESCRIPTION"
5659
R -e "buildtools:::normalize_description('${DESCRIPTION}')"
5760

5861
# Temp workaround for BioC because we need to build source packges on r-release
@@ -131,9 +134,9 @@ fi
131134
# Default LazyData to true
132135
#if [ -d "${PKGDIR}/data" ]; then
133136
#TODO: maybe also check for BuildResaveData=no (e.g. diptest/VLMC)
134-
#if ! grep '^LazyData:' "${PKGDIR}/DESCRIPTION"; then
137+
#if ! grep '^LazyData:' "${DESCRIPTION}"; then
135138
#echo "NOTE: setting LazyData: true in DESCRIPTION"
136-
#echo "LazyData: true" >> "${PKGDIR}/DESCRIPTION"
139+
#echo "LazyData: true" >> "${DESCRIPTION}"
137140
#fi
138141
# Preinstall a copy to support --resave-data
139142
#fi
@@ -156,11 +159,10 @@ echo "buildtools::replace_rmarkdown_engine()" > /tmp/vignettehack.R
156159

157160
# Replace or add "Repository:" in DESCRIPTION
158161
if [ "${MY_UNIVERSE}" ]; then
159-
sed '/^[[:space:]]*$/d' -i "${PKGDIR}/DESCRIPTION" # deletes empty lines at end of DESCRIPTION
160-
sed -n -e '/^Repository:/!p' -e "\$aRepository: ${MY_UNIVERSE}" -i "${PKGDIR}/DESCRIPTION"
161-
echo "RemoteUrl: ${1}" >> "${PKGDIR}/DESCRIPTION"
162-
echo "RemoteRef: ${BRANCH}" >> "${PKGDIR}/DESCRIPTION"
163-
echo "RemoteSha: ${2}" >> "${PKGDIR}/DESCRIPTION"
162+
sed -n -e '/^Repository:/!p' -e "\$aRepository: ${MY_UNIVERSE}" -i "${DESCRIPTION}"
163+
echo "RemoteUrl: ${1}" >> "${DESCRIPTION}"
164+
echo "RemoteRef: ${BRANCH}" >> "${DESCRIPTION}"
165+
echo "RemoteSha: ${2}" >> "${DESCRIPTION}"
164166
fi
165167

166168
# Build source package. Try vignettes, but build without otherwise.

0 commit comments

Comments
 (0)