Skip to content

Commit

Permalink
Create dummy user for zyp
Browse files Browse the repository at this point in the history
  • Loading branch information
simoniz0r committed Mar 17, 2019
1 parent 11ae5e9 commit 601dcb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions zyp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# OBS Username and password for zyp
OBS_USERNAME="zyp_user"
OBS_PASSWORD="zyp_pw_1"
9 changes: 5 additions & 4 deletions zyp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ if [[ $OPENSUSE_VERSION -ge 1550 ]]; then
else
OPENSUSE_VERSION="openSUSE_Leap_$(echo $OPENSUSE_VERSION | cut -c-2)"
fi
# get api username and password from https://raw.githubusercontent.com/openSUSE/software-o-o/master/config/options.yml
# get api username and password from https://raw.githubusercontent.com/simoniz0r/zyp/master/zyp.conf
obsauth() {
local USERANDPASS="$(curl -sL "https://raw.githubusercontent.com/openSUSE/software-o-o/master/config/options.yml" | grep -A1 -m1 'api_username' | cut -f4 -d' ' | tr '\n' ':')"
export OBS_USERNAME="$(echo "$USERANDPASS" | cut -f1 -d':')"
export OBS_PASSWORD="$(echo "$USERANDPASS" | cut -f2 -d':')"
curl -sL "https://raw.githubusercontent.com/simoniz0r/zyp/master/zyp.conf" -o "$HOME"/.cache/zyp/zyp.conf
source "$HOME"/.cache/zyp/zyp.conf
export OBS_USERNAME OBS_PASSWORD
rm -f "$HOME"/.cache/zyp/zyp.conf
}
# get colors from zypper.conf
colorparse() {
Expand Down

0 comments on commit 601dcb3

Please sign in to comment.