Skip to content

Commit 0e43882

Browse files
committed
ffnixpkgs - attempts to fast-forward nixpkgs-unstable and master
branches of `nixpkgs` fork from upstream
1 parent dad9037 commit 0e43882

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

lib.sh

+35-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LIBSH_VERSION=20250320_597f75f
1+
LIBSH_VERSION=20250325_dad9037
22
export LIBSH_VERSION
33
cat <<EOF
44
lib.sh v$LIBSH_VERSION
@@ -3094,6 +3094,40 @@ alias snc=snkc
30943094

30953095
alias verifyNotarization='spctl -a -vvv -t install'
30963096
alias vn=verifyNotarization
3097+
3098+
_ffbranch() {
3099+
gco upstream/"$1" \
3100+
&& gbd "$1" \
3101+
&& gcob "$1" \
3102+
&& gpush -f || return 1
3103+
}
3104+
3105+
ffnixpkgs() {
3106+
3107+
_require git
3108+
3109+
if [ "$(basename "$PWD")" != "nixpkgs" ]; then
3110+
echo 'assert "$(basename "$PWD")" == "nixpkgs"'
3111+
return 1
3112+
fi
3113+
3114+
if ! command git remote get-url upstream >/dev/null 2>&1; then
3115+
echo 'no remote: upstream'
3116+
exit 1
3117+
fi
3118+
3119+
local branches=(master nixpkgs-unstable)
3120+
3121+
gf -vp upstream "${branches[@]}"
3122+
3123+
for branch in "${branches[@]}"; do
3124+
_ffbranch "$branch" || {
3125+
echo "FAILED."
3126+
return 1
3127+
}
3128+
3129+
done
3130+
}
30973131
# TODO: ✂ - - - - - - - - - - - - - - - - - - -
30983132

30993133
_init() {

0 commit comments

Comments
 (0)