Commit 29140808 authored by Jurgen Verhasselt's avatar Jurgen Verhasselt Committed by cappuccinuo
Browse files

add CentOS 8 support

parent 20ebbdf5
......@@ -136,9 +136,12 @@ workflows:
- build-rpm-package:
name: centos7
image: centos:centos7
- build-rpm-package:
name: centos8
image: centos:centos8
- build-rpm-package:
name: amazon-linux-2
image: amazonlinux:2
- build-rpm-package:
name: amazon-linux
image: amazonlinux:1
\ No newline at end of file
image: amazonlinux:1
......@@ -3,9 +3,10 @@
SYSTEM_RELEASE_PATH=/etc/system-release
RHEL8_REGEX="Red Hat Enterprise Linux release 8"
FEDORA_REGEX="Fedora release"
CENTOS8_REGEX="CentOS Linux release 8"
# RHEL8 and Fedora30+ both treat shebangs of the form "#!/usr/bin/env python" as errors
if [ -f $SYSTEM_RELEASE_PATH ] && [[ "$(cat $SYSTEM_RELEASE_PATH)" =~ $RHEL8_REGEX|$FEDORA_REGEX ]]; then
# RHEL8, Fedora30+ and CentOS8 treat shebangs of the form "#!/usr/bin/env python" as errors
if [ -f $SYSTEM_RELEASE_PATH ] && [[ "$(cat $SYSTEM_RELEASE_PATH)" =~ $RHEL8_REGEX|$FEDORA_REGEX|$CENTOS8_REGEX ]]; then
# Replace the first line in .py to "#!/usr/bin/env python2" no
# matter what it was before
sed -i -e '1 s/^.*$/\#!\/usr\/bin\/env python2/' src/watchdog/__init__.py
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment