Skip to content

Instantly share code, notes, and snippets.

@yvvki
Forked from andrewgregory/makepkg-shallow.sh
Last active February 19, 2025 12:38
Show Gist options
  • Save yvvki/e4c4b3f88cc0731330f8e62bea06b74d to your computer and use it in GitHub Desktop.
Save yvvki/e4c4b3f88cc0731330f8e62bea06b74d to your computer and use it in GitHub Desktop.
makepkg wrapper with git clone filter
#!/bin/bash
regex='(https?|file)://|(git@)'
git() {
if [[ $1 == 'clone' && $* =~ $regex ]]; then
/bin/git "$@" --filter=tree:0 # or blob:none
else
/bin/git "$@"
fi
}
source /usr/bin/makepkg "$@"
@yvvki
Copy link
Author

yvvki commented Feb 16, 2025

This should work for all pacman wrapper.

Edit: It doesn't does now :3

@yvvki
Copy link
Author

yvvki commented Feb 19, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment