Merge pull request #1 from raydelto/master

Updating the year so that it will update automatically
This commit is contained in:
Sergio Lepore 2016-02-11 21:48:56 -03:00
commit 9eac40b17b
3 changed files with 9 additions and 6 deletions

View file

@ -1,8 +1,8 @@
# ChristBASHTree
You know, a Christmas tree on Bash :)
A Christmas tree on Bash created initially by Sergio Lepore, updated by Raydelto Hernandez for keeping track automatically of subsequents years.
![](https://i.imgur.com/x2ENBsL.png)
![](http://www.raydelto.org/ray_christ.png)
# Usage

View file

@ -29,10 +29,11 @@ for ((i=1; i<=2; i++))
tput cup $((lin++)) $c
echo 'mWm'
}
new_year=$(date +'%Y')
let new_year++
tput setaf 1; tput bold
tput cup $lin $((c - 6)); echo MERRY CHRISTMAS
tput cup $((lin + 1)) $((c - 10)); echo And lots of CODE in 2015
tput cup $((lin + 1)) $((c - 10)); echo And lots of CODE in $new_year
let c++
k=1

View file

@ -29,10 +29,12 @@ for ((i=1; i<=2; i++))
tput cup $((lin++)) $c
echo 'mWm'
}
ano_nuevo=$(date +'%Y')
let ano_nuevo++
tput setaf 1; tput bold
tput cup $lin $((c - 6)); echo FELICES FIESTAS
tput cup $((lin + 1)) $((c - 9)); echo Y mucho CODIGO en 2015
tput cup $((lin + 1)) $((c - 9)); echo Y mucho CODIGO en $ano_nuevo
let c++
k=1