diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-27 20:27:19 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-28 13:44:35 +0100 |
commit | bb22c8ed7995572898736767dbd54c957026d7a4 (patch) | |
tree | 1d4a607b2f237a1124fcde1a23c7f0a5d319cf0e /setup_native | |
parent | 0453a2ff5d51181dd3036b10a4a2d2eeef7981be (diff) |
use mktemp for outdir, UNPACKDIR and FAKEDBRPM
Change-Id: I53d0f027b60d681e16298531e3d890fafc43aea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129092
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/scripts/install_linux.sh | 6 | ||||
-rw-r--r-- | setup_native/scripts/langpackscript.sh | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh index d2b10e88959a..abf9b2d84e58 100644 --- a/setup_native/scripts/install_linux.sh +++ b/setup_native/scripts/install_linux.sh @@ -66,9 +66,7 @@ try_to_unpack_languagepack_file() echo "Unpacking shell script $FILENAME" TAILLINE=`head --lines=20 $FILENAME | sed --quiet 's/linenum=//p'` - UNPACKDIR=/var/tmp/install_$$ - mkdir $UNPACKDIR - # UNPACKDIR=`mktemp -d` + UNPACKDIR=`mktemp -d -p /var/tmp` tail -n +$TAILLINE $FILENAME | gunzip | (cd $UNPACKDIR; tar xvf -) # Setting the new package path, in which the packages exist @@ -243,7 +241,7 @@ else fi # populate the private rpm database with the dependencies needed -FAKEDBRPM=/tmp/fake-db-1.0-$$.noarch.rpm +FAKEDBRPM=`mktemp -p /tmp fake-db-1.0-XXXXXXXXXX.noarch.rpm` linenum=??? tail -n +$linenum $0 > $FAKEDBRPM diff --git a/setup_native/scripts/langpackscript.sh b/setup_native/scripts/langpackscript.sh index 4f0dd548467b..1a6bb39a3d48 100644 --- a/setup_native/scripts/langpackscript.sh +++ b/setup_native/scripts/langpackscript.sh @@ -108,8 +108,7 @@ esac # Unpacking -outdir=/var/tmp/install_$$ -mkdir $outdir +outdir=`mktemp -d -p /var/tmp` #diskSpace=`df -k $outdir | $tail_prog -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'` #if [ $diskSpace -lt $diskSpaceRequired ]; then |