mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Uncover IIAB_REMOTE_URL in 1 of 2 places (for both repos)
This commit is contained in:
parent
78d311a192
commit
8f0bb17990
4 changed files with 29 additions and 10 deletions
|
@ -12,7 +12,7 @@
|
|||
STAGE=0
|
||||
OS="none"
|
||||
VERSION_ID="none" # This var's combined with the above, before being output
|
||||
IIAB_REMOTE="none"
|
||||
IIAB_REMOTE_URL="none"
|
||||
IIAB_BRANCH="none"
|
||||
IIAB_COMMIT="none"
|
||||
IIAB_RECENT_TAG="none"
|
||||
|
@ -91,8 +91,13 @@ esac
|
|||
tmp=$(git rev-parse --abbrev-ref HEAD) &&
|
||||
IIAB_BRANCH=$tmp
|
||||
|
||||
tmp=$(git config remote.$(git config branch.$IIAB_BRANCH.remote).url) &&
|
||||
IIAB_REMOTE=$tmp
|
||||
tmp=$(git config branch.$IIAB_BRANCH.remote) && {
|
||||
if [[ $tmp =~ ^"https://" ]]; then
|
||||
IIAB_REMOTE_URL=$tmp
|
||||
else
|
||||
IIAB_REMOTE_URL=$(git config remote.$tmp.url)
|
||||
fi
|
||||
}
|
||||
|
||||
tmp=$(git rev-parse --verify HEAD) &&
|
||||
IIAB_COMMIT=$tmp
|
||||
|
@ -145,7 +150,7 @@ cat <<EOF
|
|||
"dhcpcd" : "$DHCPCD",
|
||||
"network_manager" : "$NETWORK_MANAGER",
|
||||
"systemd_networkd" : "$SYSTEMD_NETWORKD",
|
||||
"iiab_remote" : "$IIAB_REMOTE",
|
||||
"iiab_remote_url" : "$IIAB_REMOTE_URL",
|
||||
"iiab_branch" : "$IIAB_BRANCH",
|
||||
"iiab_commit" : "$IIAB_COMMIT",
|
||||
"iiab_recent_tag" : "$IIAB_RECENT_TAG",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue