Merge pull request #1 from raydelto/master
Updating the year so that it will update automatically
This commit is contained in:
commit
9eac40b17b
3 changed files with 9 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
# ChristBASHTree
|
# 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
|
# Usage
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,11 @@ for ((i=1; i<=2; i++))
|
||||||
tput cup $((lin++)) $c
|
tput cup $((lin++)) $c
|
||||||
echo 'mWm'
|
echo 'mWm'
|
||||||
}
|
}
|
||||||
|
new_year=$(date +'%Y')
|
||||||
|
let new_year++
|
||||||
tput setaf 1; tput bold
|
tput setaf 1; tput bold
|
||||||
tput cup $lin $((c - 6)); echo MERRY CHRISTMAS
|
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++
|
let c++
|
||||||
k=1
|
k=1
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,12 @@ for ((i=1; i<=2; i++))
|
||||||
tput cup $((lin++)) $c
|
tput cup $((lin++)) $c
|
||||||
echo 'mWm'
|
echo 'mWm'
|
||||||
}
|
}
|
||||||
|
ano_nuevo=$(date +'%Y')
|
||||||
|
let ano_nuevo++
|
||||||
tput setaf 1; tput bold
|
tput setaf 1; tput bold
|
||||||
tput cup $lin $((c - 6)); echo FELICES FIESTAS
|
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++
|
let c++
|
||||||
k=1
|
k=1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue