Skip to content

Instantly share code, notes, and snippets.

@detain
Created October 21, 2014 13:27
Show Gist options
  • Save detain/a01fff907f16d0ee162c to your computer and use it in GitHub Desktop.
Save detain/a01fff907f16d0ee162c to your computer and use it in GitHub Desktop.
Getting the correct RPM directory for compiling [for scripting purposes]
rpmdir="$(grep "^%_topdir" /usr/lib/rpm/macros | sed -e s#"^.*%{getenv:HOME}"#"${HOME}"#g -e s#"^.*%{_usrsrc}"#"/usr/src"#g)";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment