Last active
May 11, 2024 09:31
-
-
Save lamoboos223/afe223931ea7d519415867d97feb0fea to your computer and use it in GitHub Desktop.
This file contains 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
sudo yum install rpm-build rpmdevtools | |
rpmdev-setuptree | |
cd /root | |
mkdir -p rpmbuild/sources/lama_git-1.0 rpmbuild/SPECS | |
cd rpmbuild/sources/lama_git-1.0 | |
printf " | |
#!/bin/bash | |
git add . | |
git commit -m \"updated code\" | |
git push | |
" > lama_git.sh | |
cd /root/rpmbuild/SPECS | |
touch lama_git.spec | |
--rpmdev-newspec lama_git.spec | |
printf " | |
Name: lama_git | |
Version: 1.0 | |
Release: 1%{?dist} | |
Summary: blabla | |
License: MIT | |
URL: https://www.google.com | |
Source0: %{name}-%{version}.tar.gz | |
%description | |
blabla | |
%prep | |
%setup -q | |
%build | |
%install | |
mkdir -p %{buildroot}/usr/bin/ | |
cp %{_sourcedir}/%{name}-%{version}/lama_git.sh %{buildroot}/usr/bin/lama_git | |
%files | |
%{_bindir}/lama_git | |
" > lama_git.spec | |
cd /root/rpmbuild/sources | |
tar -czvf lama_git-1.0.tar.gz lama_git-1.0 | |
cd /root/rpmbuild | |
rpmbuild -ba SPECS/lama_git.spec | |
cd RPMS/x86_64 | |
sudo yum localinstall lama_git-1.0-1.el7.x86_64.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment