Projects
Eulaceura:Mainline:GA
uname-build-checks
_service:obs_scm:uname.sh
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:uname.sh of Package uname-build-checks
#!/bin/bash OUTPUT=`uname.bin $*` NOT_INSTALLED="is not installed" if [[ $* == "-r" ]];then lines=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel | wc -l` if [ "$lines" -gt 1 ]; then echo $OUTPUT exit 0 fi dir=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel | head -n 1` if [ -z "$(echo "$dir" | grep "$NOT_INSTALLED")" ]; then [ -n "$dir" ] && echo $dir && exit 0 fi dir=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel-devel | head -n 1` if [ -z "$(echo "$dir" | grep "$NOT_INSTALLED")" ]; then [ -n "$dir" ] && echo $dir && exit 0 fi dir=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel-headers | head -n 1` if [ -z "$(echo "$dir" | grep "$NOT_INSTALLED")" ]; then [ -n "$dir" ] && echo $dir && exit 0 fi echo "error: you must installed kernel or kernel-headers" && exit 1 else echo $OUTPUT fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2