build: path improvements

Use correct paths in date.py

Fix some build warnings
This commit is contained in:
Dirk-Jan C. Binnema
2023-10-14 16:46:05 +03:00
parent 51ecf46d81
commit 48cb83b427
3 changed files with 17 additions and 11 deletions

View File

@ -1,9 +1,15 @@
#!/bin/env python
#The MacOS 'date' is not quite up to GNU standards
#!/usr/bin/env python3
"""
Script to get date strings, since the MacOS 'date' is not quite up to GNU
standards
E.g..
date.py 2023-10-14 "The year-month is %y %m"
"""
import sys
from datetime import datetime
date=datetime.strptime(sys.argv[1],'%Y-%m-%d')
print(date.strftime(sys.argv[2]))
#
# ./date.py 2023-10-14 "The year-month is %y %m"
#