mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-25 12:31:34 +01:00
cros_workon: corner case fixes
* Warn if user stops working on a package he wasn't working on * Warn if user starts to work on a package he already is working on Review URL: http://codereview.chromium.org/2978002
This commit is contained in:
parent
b3f323ed73
commit
aefb186237
23
cros_workon
23
cros_workon
@ -101,6 +101,8 @@ ebuild_to_live () {
|
|||||||
if ! grep -qx "${atom}" "${KEYWORDS_FILE}" ; then
|
if ! grep -qx "${atom}" "${KEYWORDS_FILE}" ; then
|
||||||
sudo bash -c "echo \"${atom}\" >> \"${KEYWORDS_FILE}\""
|
sudo bash -c "echo \"${atom}\" >> \"${KEYWORDS_FILE}\""
|
||||||
sudo bash -c "echo \"~${atom}-9999\" >> \"${UNMASK_FILE}\""
|
sudo bash -c "echo \"~${atom}-9999\" >> \"${UNMASK_FILE}\""
|
||||||
|
else
|
||||||
|
warn "Already working on ${atom}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -110,15 +112,18 @@ ebuild_to_stable () {
|
|||||||
local atoms=$1
|
local atoms=$1
|
||||||
|
|
||||||
for atom in ${atoms}; do
|
for atom in ${atoms}; do
|
||||||
# remove the keyword
|
if grep -qx "${atom}" "${KEYWORDS_FILE}" ; then
|
||||||
sudo bash -c "grep -v '^${atom}\$' \"${KEYWORDS_FILE}\" > \
|
# remove the keyword
|
||||||
\"${KEYWORDS_FILE}+\""
|
sudo bash -c "grep -v '^${atom}\$' \"${KEYWORDS_FILE}\" > \
|
||||||
sudo mv "${KEYWORDS_FILE}+" "${KEYWORDS_FILE}"
|
\"${KEYWORDS_FILE}+\""
|
||||||
# remove the unmask
|
sudo mv "${KEYWORDS_FILE}+" "${KEYWORDS_FILE}"
|
||||||
sudo bash -c "grep -v '^~${atom}-9999\$' \"${UNMASK_FILE}\" > \
|
# remove the unmask
|
||||||
\"${UNMASK_FILE}+\""
|
sudo bash -c "grep -v '^~${atom}-9999\$' \"${UNMASK_FILE}\" > \
|
||||||
sudo mv "${UNMASK_FILE}+" "${UNMASK_FILE}"
|
\"${UNMASK_FILE}+\""
|
||||||
|
sudo mv "${UNMASK_FILE}+" "${UNMASK_FILE}"
|
||||||
|
else
|
||||||
|
warn "Not working on ${atom}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user