Skip to content

Commit

Permalink
fix: do not clean 'releases' before -p
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Feb 15, 2020
1 parent da49ab0 commit 3629751
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ EOF
#--

build () {
[ -d releases ] && rm -rf releases
mkdir -p releases

[ -d bin-static ] && rm -rf bin-static
mkdir -p bin-static

Expand Down Expand Up @@ -326,7 +329,7 @@ aarch64-linux-gnu-gcc -static -o test-aarch64 main.c
chmod +x test-aarch64
mkdir /riscv
curl -fsSL https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-20170612-x86_64-linux-centos6.tar.gz | tar -xzvf - -C /riscv --strip-components=1
curl -fsSL https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-20170612-x86_64-linux-centos6.tar.gz | tar -xzf - -C /riscv --strip-components=1
/riscv/bin/riscv64-unknown-elf-gcc -static -o test-riscv64 main.c
chmod +x test-riscv64
EOF
Expand Down Expand Up @@ -392,9 +395,6 @@ build_cfg () {
echo "BASE_ARCH: $PRINT_BASE_ARCH"; unset PRINT_BASE_ARCH
echo "HOST_ARCH: $HOST_ARCH";
echo "BUILD_ARCH: $BUILD_ARCH";

[ -d releases ] && rm -rf releases
mkdir -p releases
}

#
Expand Down Expand Up @@ -579,7 +579,8 @@ case "$1" in
unset PACKAGE_URI
build_cfg
build
cp -r releases/* ../releases/
print_start "Copy $BASE_ARCH" "$ANSI_MAGENTA"
cp -vr releases/* ../releases/
done
rm -rf releases
mv ../releases ./
Expand Down

0 comments on commit 3629751

Please sign in to comment.