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:
parent
b534442b9d
commit
0cdb4b78bd
3 changed files with 21 additions and 10 deletions
23
.travis.yml
23
.travis.yml
|
@ -1,15 +1,24 @@
|
|||
language: python
|
||||
sudo: required
|
||||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
- "3.6"
|
||||
|
||||
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:
|
||||
- debuild -i -us -uc -b
|
||||
- sudo apt install ../*.deb -y
|
||||
- sudo howdy help
|
||||
- sudo howdy list
|
||||
- sudo apt purge howdy -y
|
||||
# Build the binary (.deb)
|
||||
- debuild -i -us -uc -b
|
||||
# Install the binary, also fireing the debian scripts
|
||||
- sudo apt install ../*.deb -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:
|
||||
email:
|
||||
|
|
1
debian/prerm
vendored
1
debian/prerm
vendored
|
@ -12,6 +12,7 @@ def col(id):
|
|||
# Import required modules
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Only run when we actually want to remove
|
||||
if "remove" not in sys.argv and "purge" not in sys.argv:
|
||||
|
|
|
@ -49,13 +49,14 @@ parser.add_argument("-h", "--help",
|
|||
help="Show this help message and exit.")
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
sys.exit(0)
|
||||
print("current active user: " + user + "\n")
|
||||
parser.print_help()
|
||||
sys.exit(0)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
print(args)
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
# Check if if a command has been given and print help otherwise
|
||||
if (len(sys.argv) < 2):
|
||||
|
|
Loading…
Reference in a new issue