mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Make "portsnap extract" automatically create ${PORTSDIR} if necessary
instead of complaining that "Directory does not exist or is not writable". Suggested by: {tlp, siep} via IRC MFC after: 1 week
This commit is contained in:
parent
1d1767e89a
commit
7e6b02f651
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154088
@ -255,9 +255,11 @@ fetch_check_params() {
|
||||
|
||||
# Perform sanity checks and set some final parameters
|
||||
# in preparation for extracting or updating ${PORTSDIR}
|
||||
# Complain if ${PORTSDIR} exists but is not writable,
|
||||
# but don't complain if ${PORTSDIR} doesn't exist.
|
||||
extract_check_params() {
|
||||
_WORKDIR_bad="Directory does not exist: "
|
||||
_PORTSDIR_bad="Directory does not exist or is not writable: "
|
||||
_PORTSDIR_bad="Directory is not writable: "
|
||||
|
||||
if ! [ -d "${WORKDIR}" ]; then
|
||||
echo -n "`basename $0`: "
|
||||
@ -265,7 +267,7 @@ extract_check_params() {
|
||||
echo ${WORKDIR}
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "${PORTSDIR}" -a -w "${PORTSDIR}" ]; then
|
||||
if [ -d "${PORTSDIR}" ] && ! [ -w "${PORTSDIR}" ]; then
|
||||
echo -n "`basename $0`: "
|
||||
echo -n "${_PORTSDIR_bad}"
|
||||
echo ${PORTSDIR}
|
||||
@ -812,6 +814,8 @@ extract_metadata() {
|
||||
|
||||
# Do the actual work involved in "extract"
|
||||
extract_run() {
|
||||
mkdir -p ${PORTSDIR} || return 1
|
||||
|
||||
if !
|
||||
if ! [ -z "${EXTRACTPATH}" ]; then
|
||||
grep "^${EXTRACTPATH}" ${WORKDIR}/INDEX
|
||||
|
Loading…
Reference in New Issue
Block a user