le-proinfodata-installer: le-proinfodata-deb.sh no longer needs to clone the...

le-proinfodata-installer: le-proinfodata-deb.sh no longer needs to clone the le-proinfodata repository
Signed-off-by: default avatarEdileuton Henrique de Oliveira <eho09@c3sl.ufpr.br>
parent 75c73e63
......@@ -22,35 +22,9 @@
# USA.
PREFIX="$(dirname $(readlink -f $0))"
LEPIDURL="http://git.c3sl.ufpr.br/pub/scm/le/le-proinfodata.git"
LEPIDDIR="${PREFIX}/le-proinfodata"
LEPIDDEST="${PREFIX}/pacote/etc/le-proinfodata-installer"
# Check if the le-proinfodata debian package already exists
if test -f "${LEPIDDEST}/"le-proinfodata_*.deb; then
printf "le-proinfodata debian package already exists. Skipping %b"\
"generation.\n"
exit 0
fi
# Check if the le-proinfodata repository directory already exists, cloning it
# otherwise
if ! test -d "${LEPIDDIR}"; then
if ! git clone "${LEPIDURL}" "${LEPIDDIR}"; then
printf "ERROR (1): problems while executing git clone(1).\n"
exit 1
fi
fi
# Change to le-proinfodata directory
cd "${LEPIDDIR}"
# Ensure the le-proinfodata repository is updated
if ! git pull; then
printf "ERROR (2): problems while executing git pull(1).\n"
exit 2
fi
cd ../le-proinfodata
# Generate the debian package
if ! ./gerar.sh; then
printf "ERROR (3): problems while generating le-proinfodata deb.\n"
......@@ -61,7 +35,7 @@ fi
mkdir -p "${LEPIDDEST}"
# Get the most updated deb
LEPIDDEB="$(ls "${LEPIDDIR}" | grep le-proinfodata | sort | tail -n 1)"
LEPIDDEB="$(ls | grep le-proinfodata | sort | tail -n 1)"
# Copy the le-proinfodata debian package to the correct place
cp "${LEPIDDEB}" "${LEPIDDEST}/"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment