0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

Command line & travis improvements

This commit is contained in:
boltgolt 2018-04-13 15:27:52 +02:00
parent b534442b9d
commit 0cdb4b78bd
3 changed files with 21 additions and 10 deletions

View file

@ -1,15 +1,24 @@
language: python
sudo: required sudo: required
language: python
python:
- "3.4"
- "3.6"
install: install:
- sudo apt install devscripts dh-make -y # Install build tools and ack-grep for checks
- sudo apt install devscripts dh-make ack-grep -y
script: script:
- debuild -i -us -uc -b # Build the binary (.deb)
- sudo apt install ../*.deb -y - debuild -i -us -uc -b
- sudo howdy help # Install the binary, also fireing the debian scripts
- sudo howdy list - sudo apt install ../*.deb -y
- sudo apt purge howdy -y # Check if the username passthough works correctly with sudo
- 'howdy | ack-grep --passthru --color "current active user: travis"'
- 'sudo howdy | ack-grep --passthru --color "current active user: travis"'
- sudo howdy list
# Remove howdy from the installation
- sudo apt purge howdy -y
notifications: notifications:
email: email:

1
debian/prerm vendored
View file

@ -12,6 +12,7 @@ def col(id):
# Import required modules # Import required modules
import subprocess import subprocess
import sys import sys
import os
# Only run when we actually want to remove # Only run when we actually want to remove
if "remove" not in sys.argv and "purge" not in sys.argv: if "remove" not in sys.argv and "purge" not in sys.argv:

View file

@ -49,13 +49,14 @@ parser.add_argument("-h", "--help",
help="Show this help message and exit.") help="Show this help message and exit.")
if len(sys.argv) < 2: if len(sys.argv) < 2:
parser.print_help() print("current active user: " + user + "\n")
sys.exit(0) parser.print_help()
sys.exit(0)
args = parser.parse_args() args = parser.parse_args()
print(args) print(args)
sys.exit(1) sys.exit(0)
# Check if if a command has been given and print help otherwise # Check if if a command has been given and print help otherwise
if (len(sys.argv) < 2): if (len(sys.argv) < 2):