blob: 5a5957fa61c604eba74f04e75106491f17891b92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/usr/bin/env sh
#
# Install IRPF
# Requires trashman/oracle-java8
# https://idg.receita.fazenda.gov.br/interface/cidadao/irpf/2018/download/linux-bin-64-bits
# Parameters
SHARE="$1"
LIB="$2"
# Include basic functions
. $LIB/trashman/functions || exit 1
. $LIB/trashman/debian || exit 1
# Working folder
CWD="`pwd`"
WORK="`mktemp -d`"
YEAR="2024"
VERSION="1.1.0.1"
FILE="IRPF${YEAR}Linux-x86_64v${VERSION}.sh.bin"
# Download
cd $WORK || exit 1
wget -c http://downloadirpf.receita.fazenda.gov.br/irpf/$YEAR/irpf/arquivos/$FILE || exit 1
cp $SHARE/irpf/unix/linux/hashes/* . || exit 1
sha1sum -c ${FILE}.sha1 || exit 1
sha256sum -c ${FILE}.sha256 || exit 1
sha512sum -c ${FILE}.sha512 || exit 1
chmod +x ${FILE} || exit 1
./${FILE} || exit 1
cd $CWD
rm -rf $WORK || exit 1
trashman_installed_at $HOME/ProgramasRFB/IRPF${YEAR}
# Run
echo "Run IRPF ${YEAR} with the following command:"
echo ""
echo "\t/usr/bin/java -Xms128M -Xmx512M -jar ${HOME}/ProgramasRFB/IRPF${YEAR}/irpf.jar"
|