We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
yum -y install wget | tee -a $LOGFILE
is the return code of tee, not yum. Add "set -o pipefail" or use more bash-specific PIPESTATUS
Patch
--- build.bash.orig 2025-02-03 10:23:22.277692320 +0300 +++ build.bash 2025-02-03 10:47:08.576374670 +0300 @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #-----------------------------------------------------------------------------# +set -o pipefail + action=$1 [[ -z $action ]] && action="production" # default to prod if no arg supplied @@ -214,13 +216,21 @@ #-----------------------------------------------------------------------------# # crb repo #-----------------------------------------------------------------------------# - rpm -q redhat-release >/dev/null 2>&1 + which subscription-manager >/dev/null 2>&1 if [ $? -ne 0 ]; then - dnf config-manager --set-enabled crb | tee -a $LOGFILE + REPONAME=`dnf repolist --all | awk '/(codeready|crb)/{print $1}'` + CRB=${CRB:=$REPONAME} + if [ -z "$CRB" ]; then + logthis "ERROR: crb repo name not found" + logthis "Try: CRB=<codeready repo name> $0" + logthis "^^^^^^^^^^ SCRIPT ABORTED ^^^^^^^^^^" + exit 1 + fi + dnf config-manager --set-enabled $CRB | tee -a $LOGFILE if [ $? -eq 0 ]; then logthis "crb repo enabled" else - logthis "ERROR: crb repo enable failed" + logthis "ERROR: crb repo '$CRB' enable failed" logthis "^^^^^^^^^^ SCRIPT ABORTED ^^^^^^^^^^" exit 1 fi
If necessary, I can create merge request.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
is the return code of tee, not yum.
Add "set -o pipefail" or use more bash-specific PIPESTATUS
Patch
If necessary, I can create merge request.
The text was updated successfully, but these errors were encountered: