Fix setting the variable for 'year'

This commit is contained in:
pxgamer 2018-02-19 16:47:28 +00:00
parent f8727bef89
commit 652d5e341a
No known key found for this signature in database
GPG Key ID: 8F15E14C0F7BA063

View File

@ -23,7 +23,8 @@ function __omf.packages.new.from_template -a path github user name
echo (basename "$file")
end
end)
sed "s/{{USER_NAME}}/$user/;s/{{GITHUB_USER}}/$github/;s/{{NAME}}/$name/;s/{{YEAR}}/${date +%y}/" \
set -l year (date +%Y)
sed "s/{{USER_NAME}}/$user/;s/{{GITHUB_USER}}/$github/;s/{{NAME}}/$name/;s/{{YEAR}}/$year/" \
$file > $target
echo (omf::em)" create "(omf::off)" "(begin
if test (basename $PWD) = $name