mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Delete temp directory in get-daml.sh (#3233)
* Delete temp directory after get-daml.sh * Revert dockerfile change from #3224
This commit is contained in:
parent
f3b98ca31d
commit
b7e6088bcd
@ -3,5 +3,5 @@ RUN apk add curl bash
|
||||
ARG VERSION
|
||||
RUN addgroup -S daml && adduser -S daml -G daml
|
||||
USER daml
|
||||
RUN curl https://get.daml.com | sh -s $VERSION && rm -rf /tmp/*
|
||||
RUN curl https://get.daml.com | sh -s $VERSION
|
||||
ENV PATH="/home/daml/.daml/bin:${PATH}"
|
||||
|
@ -17,14 +17,17 @@
|
||||
#
|
||||
|
||||
set -eu
|
||||
cleanup() {
|
||||
echo "$(tput setaf 3)FAILED TO INSTALL!$(tput sgr 0)"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
readonly SWD="$PWD"
|
||||
readonly TMPDIR="$(mktemp -d)"
|
||||
cd $TMPDIR
|
||||
|
||||
cleanup() {
|
||||
echo "$(tput setaf 3)FAILED TO INSTALL!$(tput sgr 0)"
|
||||
cd $SWD
|
||||
rm -rf $TMPDIR
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
#
|
||||
# Check if curl and tar are available.
|
||||
#
|
||||
@ -113,4 +116,5 @@ fi
|
||||
#
|
||||
trap - EXIT
|
||||
echo "$(tput setaf 3)Successfully installed DAML.$(tput sgr 0)"
|
||||
|
||||
cd $SWD
|
||||
rm -rf $TMPDIR
|
||||
|
Loading…
Reference in New Issue
Block a user