]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/git.subr
Moved MAKEFLAGS out of DLL script
[xonotic/xonotic.git] / misc / tools / all / git.subr
index 33054119e013680b08db65b02719556a3058f651..7d819456f3740c9de03404058bf97cf6e1691f07 100644 (file)
@@ -19,6 +19,10 @@ initrepo()
        base=
        pushbase=
        allrepos initrepo_ "`git config remote.origin.url`" "`git config remote.origin.pushurl`"
+       if [ -z "$base" ]; then
+               msg "The main repo is not xonotic.git, what have you done?"
+               exit 1
+       fi
        msg "Found main repo = $base"
        if [ -n "$pushbase" ]; then
                msg "Found push repo = $pushbase"
@@ -59,7 +63,7 @@ mirrorspeed()
        # now actually time it
        (
                set +x
-               export REPO=$1 # so that the sh -c subshell can use it
+               export REPO="$1" # so that the sh -c subshell can use it
                { measure_time sh -c 'git ls-remote "$REPO" refs/heads/master >/dev/null 2>&1'; } 2>&1 >/dev/null | head -n 1 | cut -d ' ' -f 2 | tr -d . | sed 's,^0*,,' | grep . || echo 0
                        # unit: clock ticks (depends on what "time" returns
        )
@@ -448,7 +452,7 @@ case "$cmd" in
                allrepos ifrepoenabled 0 fix_config_
                ;;
        keygen)
-               if [ -f ~/.ssh/id_rsa.pub ]; then
+               if [ -f ~/.ssh/id_ef25519.pub ]; then
                        msg ""
                        msg "A key already exists and no new one will be generated. If you"
                        msg "already have done the procedure for getting your key approved, you"
@@ -457,7 +461,22 @@ case "$cmd" in
                        msg "To get access, your key has to be approved first. For that, visit"
                        msg "$gitsite_url, then log in, enter the"
                        msg "\"xonotic\" project, create an \"Issue\" tagged \"Repository Access\""
-                       msg "to apply for access and paste the following output into the issue:"
+                       msg "to apply for access."
+                       msg ""
+                       msg "After that, go to your profile settings, \"SSH Keys\", \"Add SSH Key\""
+                       msg "and paste the following output:"
+                       msg ""
+                       msg "`cat ~/.ssh/id_ef25519.pub`"
+               elif [ -f ~/.ssh/id_rsa.pub ]; then
+                       msg ""
+                       msg "A key already exists and no new one will be generated. If you"
+                       msg "already have done the procedure for getting your key approved, you"
+                       msg "can skip the following paragraph and already use the repository."
+                       msg ""
+                       msg "To get access, your key has to be approved first. For that, visit"
+                       msg "$gitsite_url, then log in, enter the"
+                       msg "\"xonotic\" project, create an \"Issue\" tagged \"Repository Access\""
+                       msg "to apply for access."
                        msg ""
                        msg "After that, go to your profile settings, \"SSH Keys\", \"Add SSH Key\""
                        msg "and paste the following output:"
@@ -472,7 +491,7 @@ case "$cmd" in
                        msg "To get access, your key has to be approved first. For that, visit"
                        msg "$gitsite_url, then log in, enter the"
                        msg "\"xonotic\" project, create an \"Issue\" tagged \"Repository Access\""
-                       msg "to apply for access and paste the following output into the issue:"
+                       msg "to apply for access."
                        msg ""
                        msg "After that, go to your profile settings, \"SSH Keys\", \"Add SSH Key\""
                        msg "and paste the following output:"
@@ -490,7 +509,7 @@ case "$cmd" in
                        msg "To get access, your key has to be approved first. For that, visit"
                        msg "$gitsite_url, then log in, enter the"
                        msg "\"xonotic\" project, create an \"Issue\" tagged \"Repository Access\""
-                       msg "to apply for access and paste the following output into the issue:"
+                       msg "to apply for access."
                        msg ""
                        msg "After that, go to your profile settings, \"SSH Keys\", \"Add SSH Key\""
                        msg "and paste the following output:"
@@ -573,7 +592,7 @@ case "$cmd" in
                        fi
                        shift
                done
-               
+
                if $need_bestmirror; then
                        newbase=`bestmirror "$base" "$newprotocol" "$newlocation"`
                        if [ -z "$newbase" ]; then