Created
May 15, 2017 14:33
-
-
Save orangecms/09e7168db4d23a40f2c39179c92cb8e9 to your computer and use it in GitHub Desktop.
A simple one-liner to get the current branch name in your Linux kernel `.config` 🎉
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 | |
sed -i "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$(git branch | grep "*" | cut -b 3-)\"/" .config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment