mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
scripts/jannet: Add two new commands
Add build-date and built-today Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
6395fa892c
commit
606994f875
1 changed files with 36 additions and 11 deletions
|
|
@ -20,16 +20,18 @@ cat << EOT
|
|||
|
||||
command is one of
|
||||
|
||||
help: show this help screen
|
||||
init: initialize
|
||||
uninit: undo initialization
|
||||
install: install packages in [arguments]
|
||||
update: update all jannet software on the system
|
||||
restore: restore a previous jannet software version state
|
||||
info: query information about installed software
|
||||
checklog: update the installation log file if necessary
|
||||
rpmnew: remove superfluous rpmnew files and show conflicts
|
||||
for others
|
||||
help: show this help screen
|
||||
init: initialize
|
||||
uninit: undo initialization
|
||||
install: install packages in [arguments]
|
||||
update: update all jannet software on the system
|
||||
restore: restore a previous jannet software version state
|
||||
info: query information about installed software
|
||||
checklog: update the installation log file if necessary
|
||||
rpmnew: remove superfluous rpmnew files and show conflicts
|
||||
for others
|
||||
build-date: show installed jannet packages along with build date
|
||||
built-today: show installed jannet packages that were built today
|
||||
|
||||
EOT
|
||||
if [ "$1" ]; then
|
||||
|
|
@ -128,6 +130,24 @@ cmd_diff()
|
|||
done
|
||||
}
|
||||
|
||||
cmd_build_date()
|
||||
{
|
||||
list_all_packages |
|
||||
xargs rpm -q --queryformat '%{BUILDTIME} %{NAME}\n' |
|
||||
sort -n |
|
||||
sed 's/-run\|-devel//' |
|
||||
sort -u |
|
||||
while read t p; do
|
||||
echo `date --date=@$t --rfc-3339=seconds` $p
|
||||
done
|
||||
}
|
||||
|
||||
cmd_built_today()
|
||||
{
|
||||
local today=`date +'%Y-%m-%d'`
|
||||
cmd_build_date | grep $today | cut -d' ' -f3
|
||||
}
|
||||
|
||||
cmd="$1"
|
||||
shift
|
||||
get_opts $*
|
||||
|
|
@ -193,10 +213,15 @@ rpmnew)
|
|||
diff)
|
||||
cmd_diff $@
|
||||
;;
|
||||
build-date)
|
||||
cmd_build_date
|
||||
;;
|
||||
built-today)
|
||||
cmd_built_today
|
||||
;;
|
||||
help)
|
||||
usage 0
|
||||
;;
|
||||
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue