]> git.lizzy.rs Git - rust.git/commitdiff
Improve prepare_libcore.sh
authorbjorn3 <bjorn3@users.noreply.github.com>
Tue, 18 Sep 2018 16:41:41 +0000 (18:41 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Tue, 18 Sep 2018 16:41:41 +0000 (18:41 +0200)
prepare_libcore.sh

index 32e90144a25c7d95bb55c4275df75327c1e9b9b9..75b6c8a908452418a021cc860b5f1e62a1df6974 100755 (executable)
@@ -1,11 +1,14 @@
 #!/bin/bash --verbose
+set -e
+
 SRC_DIR="target/libcore"
-rm -rf $SRC_DIR &&
-mkdir -p $SRC_DIR/src &&
+rm -rf $SRC_DIR
+mkdir -p $SRC_DIR/src
 cp -r $(dirname $(rustup which rustc))/../lib/rustlib/src/rust/src/libcore $SRC_DIR/src/libcore || (echo "Please install rust-src component"; exit 1)
-cd $SRC_DIR || exit 1
-git init || exit 1
-git add . || exit 1
-git commit -m "Initial commit" -q || exit 1
-git apply ../../000*.patch || exit 1
+cd $SRC_DIR
+git init
+git add .
+git commit -m "Initial commit" -q
+git apply ../../000*.patch
+
 echo "Successfully prepared libcore for building"