Skip to content

Instantly share code, notes, and snippets.

@dillera
Created March 1, 2020 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dillera/e9cf2d238c8e1c87b8100631a837283b to your computer and use it in GitHub Desktop.
Save dillera/e9cf2d238c8e1c87b8100631a837283b to your computer and use it in GitHub Desktop.
Helper functions for sgugshell.sh
sgcp() {
cp -r ~/rpmbuild/sgug-rse/packages/"$1"/* ~/rpmbuild/
}
sgwipcp() {
cp -r ~/rpmbuild/sgug-rse-wip/packages/"$1"/* ~/rpmbuild/
}
sgsbuild() {
cd ~/rpmbuild/SPECS
TARGET="$(ls -1 ~/rpmbuild/SRPMS/ | grep ${1})"
rpm -ivh ~/rpmbuild/SRPMS/${TARGET}
}
sgrbuild() {
rpmbuild --undefine=_disable_source_fetch -ba ${1}.spec --nocheck
}
sggit() {
cd ~/rpmbuild/sgug-rse
}
sgspec() {
cd ~/rpmbuild/SPECS
}
sgsrc() {
cd ~/rpmbuild/SRPMS
}
sgwip() {
cd ~/rpmbuild/SRPMS
}
export -f sgcp
export -f sgwipcp
export -f sgsbuild
export -f sgrbuild
export -f sggit
export -f sgspec
export -f sgsrc
export -f sgwip
echo 'setup sg commands from ~/.sgug_bashrc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment