This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Dynamically updates versioned symlinks in /usr/local/bin for independent Ruby gems. | |
| # Maps target binaries to their active Gentoo package ruby_targets using /var/db/pkg. | |
| # This script was composed with significant help from Google AI. | |
| shopt -s nullglob || exit | |
| LINK_DIR="/usr/local/bin" | |
| SELECTOR_PATH="/write/libexec/ruby/gem-binary-exec.bash" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Selects Ruby interpreter based on the name of the called symbolic link linked to it. | |
| # This script was composed with significant help from Google AI. | |
| cmd=${0##*/} | |
| if [[ ${cmd} =~ ^([a-zA-Z_-]+)([0-9][0-9])$ ]]; then | |
| base_cmd="${BASH_REMATCH[1]}" | |
| ruby_ver="${BASH_REMATCH[2]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_command_string { | |
| local string= q | |
| for __; do | |
| printf -v q %q "$__" | |
| if [[ $q == "$__" ]]; then | |
| string+=" $__" | |
| elif [[ $__ == *\'* ]]; then | |
| string+=" $q" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # Copyright (c) 2025 konsolebox | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Runs command while optionally redirecting stdout, | |
| * stderr and stdin to a file prior and not | |
| * making any changes to the environment. | |
| * | |
| * Author: Grok | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inherit toolchain-funcs | |
| tc-get-resource-dir() { | |
| local compiler_type=$(tc-get-compiler-type) | |
| case ${compiler_type} in | |
| gcc) | |
| $(tc-getCC) -print-search-dirs | \ | |
| awk '/^install: / { print $2; r = 1 } END { exit !r }' || die | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -p | |
| # ph (Portage Helper) | |
| # | |
| # An opinionated tool that provides useful commands for querying and | |
| # modifying Portage-related stuff | |
| # | |
| # Usage: ph command [arguments] | |
| # | |
| # Copyright (c) 2024 konsolebox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cnf/make.globals b/cnf/make.globals | |
| index f951bb3..9716371 100644 | |
| --- a/cnf/make.globals | |
| +++ b/cnf/make.globals | |
| @@ -80,7 +80,7 @@ FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs | |
| fixlafiles ipc-sandbox merge-sync multilib-strict | |
| network-sandbox news parallel-fetch pid-sandbox | |
| preserve-libs protect-owned qa-unresolved-soname-deps | |
| - sandbox sfperms strict | |
| + restrict-mirror sandbox sfperms strict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > git diff variables.c examples/loadables/realpath.c | |
| diff --git a/examples/loadables/realpath.c b/examples/loadables/realpath.c | |
| index d52739c9..1cbcaa0d 100644 | |
| --- a/examples/loadables/realpath.c | |
| +++ b/examples/loadables/realpath.c | |
| @@ -67,7 +67,7 @@ int | |
| realpath_builtin(WORD_LIST *list) | |
| { | |
| int opt, cflag, vflag, qflag, sflag, aflag, es; | |
| - char *r, realbuf[PATH_MAX], *p, *newpath; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > git diff configure.ac config.h.in variables.c | |
| diff --git a/config.h.in b/config.h.in | |
| index 84113a8f..6647a490 100644 | |
| --- a/config.h.in | |
| +++ b/config.h.in | |
| @@ -121,6 +121,10 @@ | |
| to have by default */ | |
| #undef EXTGLOB_DEFAULT | |
| +/* Define BASH_SOURCE_FULLPATH_DEFAULT to the value you'd like the |
NewerOlder