Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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