Merge "Add distro check functions for Ubuntu and Fedora"
This commit is contained in:
10
functions.sh
10
functions.sh
@@ -16,6 +16,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Distro check functions
|
||||
function is_fedora {
|
||||
lsb_release -i 2>/dev/null | grep -iq "fedora"
|
||||
}
|
||||
|
||||
function is_ubuntu {
|
||||
lsb_release -i 2>/dev/null | grep -iq "ubuntu"
|
||||
}
|
||||
|
||||
|
||||
function function_exists {
|
||||
type $1 2>/dev/null | grep -q 'is a function'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user