<div dir="ltr">As per discussion at <a href="https://bugs.archlinux.org/task/41186" target="_blank">https://bugs.archlinux.org/task/41186</a> here is a patch adding a -r and --root option to abs so a user can specify an alternate ABSROOT, <div>e.g. a user can type:</div><div><br></div><div>abs -r. core/linux</div><div><br></div><div>instead of the cumbersome looking:</div><div><span style="line-height:1.1em;background-color:rgb(235,241,245)"><br></span></div><div><span style="line-height:1.1em;background-color:rgb(235,241,245)">ABSROOT=. abs core/linux</span></div><div><br></div><div><span style="line-height:14.3000001907349px;background-color:rgb(235,241,245)">I will update this in the wiki at </span><a href="https://wiki.archlinux.org/index.php/Kernels/Compilation/Arch_Build_System">https://wiki.archlinux.org/index.php/Kernels/Compilation/Arch_Build_System</a> if this patch gets accepted.<div><br></div><div><div>--- a/abs<span style="white-space:pre-wrap">     </span>2014-07-01 00:26:01.047766500 +0800</div><div>+++ b/abs<span style="white-space:pre-wrap">     </span>2015-07-11 09:15:38.410677329 +0800</div><div>@@ -69,6 +69,8 @@</div><div> ##</div><div> [ -f ~/.abs.conf ] && source ~/.abs.conf</div><div> </div><div>+ABSROOT_DEFAULT="$ABSROOT"</div><div>+</div><div> ##</div><div> # Helper functions</div><div> ##</div><div>@@ -79,13 +81,15 @@</div><div> <span style="white-space:pre-wrap">        </span>echo "$0 [options] [repository1[/package1] [repository2[/package2] ...]]"</div><div> <span style="white-space:pre-wrap">    </span>echo</div><div> <span style="white-space:pre-wrap">   </span>echo "Options:"</div><div>-<span style="white-space:pre-wrap">       </span>echo "  -h, --help     Display this help message then exit."</div><div>-<span style="white-space:pre-wrap">       </span>echo "  -V, --version  Display version information then exit."</div><div>-<span style="white-space:pre-wrap">      </span>echo "  -t, --tarball  Sync ABS tree using tarballs from your pacman mirror."</div><div>+<span style="white-space:pre-wrap">       </span>echo "  -h, --help       Display this help message then exit."</div><div>+<span style="white-space:pre-wrap">    </span>echo "  -V, --version    Display version information then exit."</div><div>+<span style="white-space:pre-wrap">   </span>echo "  -t, --tarball    Sync ABS tree using tarballs from pacman mirror."</div><div>+<span style="white-space:pre-wrap"> </span>echo "  -r, --root <dir> Sync to specified dir rather than $ABSROOT_DEFAULT."</div><div> <span style="white-space:pre-wrap"> </span>echo</div><div> <span style="white-space:pre-wrap">   </span>echo "abs will synchronize PKGBUILD scripts from the Arch Linux repositories"</div><div>-<span style="white-space:pre-wrap"> </span>echo "into $ABSROOT via rsync. If no argument is given, abs will synchronize"</div><div>-<span style="white-space:pre-wrap"> </span>echo "the repositories specified in ${CONFDIR}abs.conf."</div><div>+<span style="white-space:pre-wrap">      </span>echo "into $ABSROOT_DEFAULT (or where you specify -r/--root) via rsync."</div><div>+<span style="white-space:pre-wrap">      </span>echo "If no argument is given, abs will synchronize the repositories"</div><div>+<span style="white-space:pre-wrap"> </span>echo "specified in ${CONFDIR}abs.conf."</div><div> <span style="white-space:pre-wrap">      </span>echo</div><div> <span style="white-space:pre-wrap">   </span>echo "Report bugs to $BUG_REPORT_EMAIL with [ABS] in the subject"</div><div> }</div><div>@@ -218,8 +222,8 @@</div><div> ##</div><div> # Parse Options</div><div> ##</div><div>-OPT_SHORT="hVt"</div><div>-OPT_LONG="help,version,tarball"</div><div>+OPT_SHORT="hVtr:"</div><div>+OPT_LONG="help,version,tarball,root:"</div><div> OPT_TEMP="$(getopt -o "$OPT_SHORT" -l "$OPT_LONG" -n "$(basename "$0")" -- "$@" || echo 'GETOPT GO BANG!')"</div><div> if echo "$OPT_TEMP" | grep -q 'GETOPT GO BANG!'; then</div><div> <span style="white-space:pre-wrap">      </span># This is a small hack to stop the script bailing with 'set -e'</div><div>@@ -233,6 +237,7 @@</div><div> <span style="white-space:pre-wrap">              </span>-h|--help)     usage; exit $_E_OK;;</div><div> <span style="white-space:pre-wrap">          </span>-V|--version)  version; exit $_E_OK;;</div><div> <span style="white-space:pre-wrap">         </span>-t|--tarball)  TARBALL=1;;</div><div>+<span style="white-space:pre-wrap">             </span>-r|--root)     ABSROOT="$2"; shift;;</div><div> </div><div> <span style="white-space:pre-wrap">              </span>--)            OPT_IND=0; shift; break;;</div><div> <span style="white-space:pre-wrap">         </span>*)             usage; exit $_E_INVALID_OPTION;;</div><div>--<br>bulletmark.</div>
</div></div></div>