Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 625438 Details for
Bug 714634
gentoo-prefix project bootstrap-bash.sh has bashisms and invalid code
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
diff -u bootstrap-bash_orig.sh bootstrap-bash.sh
bootstrap_bash.diff (text/plain), 1.95 KB, created by
Chris Slycord
on 2020-03-25 07:41:06 UTC
(
hide
)
Description:
diff -u bootstrap-bash_orig.sh bootstrap-bash.sh
Filename:
MIME Type:
Creator:
Chris Slycord
Created:
2020-03-25 07:41:06 UTC
Size:
1.95 KB
patch
obsolete
>--- bootstrap-bash_orig.sh >+++ bootstrap-bash.sh >@@ -10,7 +10,7 @@ > > if [ -z "$1" ] ; then > echo "usage: ${0} <location>" > /dev/stderr >- exit -1 >+ exit 255 > fi > > mkdir -p "$1" >@@ -20,6 +20,22 @@ > > GENTOO_MIRRORS=${GENTOO_MIRRORS:="http://distfiles.gentoo.org/distfiles"} > >+command_exists() { >+ check_cmd="$1" >+ command -v $check_cmd >/dev/null 2>&1 >+} >+ >+same_file() { >+ file1="$1" >+ file2="$2" >+ >+ if [ "$(stat -c '%i%d' "$file1" "$file2" | sort -u | wc -l)" -eq 1 ]; then >+ return 0 >+ else >+ return 1 >+ fi >+} >+ > if [ ! -e bash-4.2.tar.gz ] ; then > eerror() { echo "!!! $*" 1>&2; } > einfo() { echo "* $*"; } >@@ -27,18 +43,29 @@ > if [ -z ${FETCH_COMMAND} ] ; then > # Try to find a download manager, we only deal with wget, > # curl, FreeBSD's fetch and ftp. >- if [ x$(type -t wget) == "xfile" ] ; then >+ if command_exists wget; then > FETCH_COMMAND="wget" >- [ $(wget -h) == *"--no-check-certificate"* ] && FETCH_COMMAND+=" --no-check-certificate" >- elif [ x$(type -t curl) == "xfile" ] ; then >+ case "$(wget -h 2>&1)" in >+ *"--no-check-certificate"*) >+ FETCH_COMMAND="$FETCH_COMMAND --no-check-certificate" >+ ;; >+ esac >+ elif command_exists curl; then > einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!" > FETCH_COMMAND="curl -f -L -O" >- elif [ x$(type -t fetch) == "xfile" ] ; then >+ elif command_exists fetch; then > FETCH_COMMAND="fetch" >- elif [ x$(type -t ftp) == "xfile" ] && >- [ ${CHOST} != *-cygwin* || ! $(type -P ftp) -ef $(cygpath -S)/ftp ] ; then >+ elif command_exists ftp; then > FETCH_COMMAND="ftp" >- else >+ case "${CHOST}" in >+ *-cygwin*) >+ if same_file "$(command -v ftp)" "$(cygpath -S)/ftp"; then >+ FETCH_COMMAND='' >+ fi >+ ;; >+ esac >+ fi >+ if [ -z ${FETCH_COMMAND} ]; then > eerror "no suitable download manager found (need wget, curl, fetch or ftp)" > eerror "could not download ${1##*/}" > eerror "download the file manually, and put it in ${PWD}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 714634
: 625438