hyper-v/get_release_number.sh

8 lines
211 B
Bash

#! /bin/sh
if test "$PWD" = "/" || test "$PWD" = "$HOME"
then
cd /usr/src/packages/SOURCES
fi
exec env -i TZ=UTC date --reference="`ls -td * | head -n 1`" +%Y%m%d.%H%M%S
exec env -i TZ=UTC date +%Y%m%d.%H%M%S