saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
hasufell 2015-09-24 15:46:54 +02:00 committed by Hans Wurst
parent 37ca551459
commit a72de5ae3a
2 changed files with 16 additions and 0 deletions

View File

@ -31,6 +31,10 @@ try_to_apply_patches()
einfo "Check ${PATCH_DIR_FULL}"
fi
if [[ -d ${PATCH_DIR_FULL} ]] ; then
# activate nullglob if it isn't already
local saved_opt=$(shopt nullglob &> /dev/null && echo "yes" || echo "no")
[[ ${saved_opt} == no ]] && shopt -s nullglob
cd "${S}" || die "Failed to cd into ${S}!"
for i in "${PATCH_DIR_FULL}"/*.patch ; do
if declare -f epatch >/dev/null ; then
@ -42,6 +46,10 @@ try_to_apply_patches()
fi
touch "${_ap_rememberfile}" || die "Failed to touch ${_ap_rememberfile}!"
done
# make sure nullglob is set to what it was before this function was called
[[ ${saved_opt} == no ]] && shopt -u nullglob
if [[ -e ${_ap_rememberfile} ]]; then
issue_a_warning "will be"
else

View File

@ -1,2 +1,10 @@
#!/bin/bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
ebegin "Working around ycm broken live dirs"
if [[ ${CATEGORY}/${PN} == app-vim/youcompleteme ]] ; then
mkdir -p "${S}"/third_party/ycmd/third_party/sh
touch "${S}"/third_party/ycmd/libclang.so
fi
eend $?