diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-08 16:07:26 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-08 16:07:26 +0200 |
| commit | 19e95772a8b8ba047703089f643df5e3805d9969 (patch) | |
| tree | a3fff7d2de8b4a640d7b12e728b95781e056bd97 /personal/cv/add-personal-info.sh | |
| parent | ab31f6e55a18b444edc23c02847be2dd189c5f06 (diff) | |
| parent | 7fad68ac3517e55adc9ab6817a5778f10374f3b0 (diff) | |
| download | memory-leaks-19e95772a8b8ba047703089f643df5e3805d9969.tar.xz | |
Merge branch 'cv' into master
Diffstat (limited to 'personal/cv/add-personal-info.sh')
| -rwxr-xr-x | personal/cv/add-personal-info.sh | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/personal/cv/add-personal-info.sh b/personal/cv/add-personal-info.sh deleted file mode 100755 index 2e9ea8b..0000000 --- a/personal/cv/add-personal-info.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -eu - -input=$1; output=$2 -cp ${input} ${output} - -. personal-info - -fullname=$(getent passwd $(whoami) | cut -d: -f5 | cut -d, -f1) -sed -i s/INSERT-FULLNAME-HERE/"${fullname}"/ ${output} - -# On the one hand, anyone can compute my age from my birth date. On -# the other hand, wasting reader brain cycles on this computation -# sounds kind of rude. On the gripping hand, having to bump my age -# manually every year would be silly. Clearly the way forward is to -# summon the powers of bash, date, bc and sed to save us the trouble. - -birthstamp=$(date -d "${birthday}" +%s) -now=$(date +%s) -age=$(bc <<< "(${now}-${birthstamp})/(3600*24*365.25)") -sed -i s/INSERT-BIRTHDATE-HERE/"${birthday} (${age})"/ ${output} - -sed -i s/INSERT-LOCATION-HERE/"${location}"/ ${output} - -sed -i s/INSERT-PHONE-HERE/"${phone_number}"/ ${output} - -# Set by .profile and/or .xsessionrc. -sed -i s/INSERT-MAIL-HERE/${EMAIL}/ ${output} |
