Skip to content
Snippets Groups Projects
Commit 53b46ce6 authored by Julien Cretin's avatar Julien Cretin Committed by Julien Cretin
Browse files

Add instructions to re-run setup.sh

parent 796261d5
Branches
No related tags found
No related merge requests found
...@@ -31,13 +31,31 @@ git submodule update --init ...@@ -31,13 +31,31 @@ git submodule update --init
done_text="$(tput bold)DONE.$(tput sgr0)" done_text="$(tput bold)DONE.$(tput sgr0)"
patch_conflict_detected () {
cat <<EOF
This script cannot be run twice without reverting the patches.
To do so, follow these instructions:
1. Commit any changes you want to save.
2. Run the ./reset.sh script to revert all uncommitted changes.
3. Run the ./setup.sh script again.
EOF
exit 1
}
# Apply patches to kernel. Do that in a sub-shell # Apply patches to kernel. Do that in a sub-shell
( (
cd third_party/tock/ && \ cd third_party/tock/ && \
for p in ../../patches/tock/[0-9][0-9]-*.patch for p in ../../patches/tock/[0-9][0-9]-*.patch
do do
echo -n '[-] Applying patch "'$(basename $p)'"... ' echo -n '[-] Applying patch "'$(basename $p)'"... '
git apply "$p" && echo $done_text if git apply "$p"
then
echo $done_text
else
patch_conflict_detected
fi
done done
) )
...@@ -47,7 +65,12 @@ done_text="$(tput bold)DONE.$(tput sgr0)" ...@@ -47,7 +65,12 @@ done_text="$(tput bold)DONE.$(tput sgr0)"
for p in ../../patches/libtock-rs/[0-9][0-9]-*.patch for p in ../../patches/libtock-rs/[0-9][0-9]-*.patch
do do
echo -n '[-] Applying patch "'$(basename $p)'"... ' echo -n '[-] Applying patch "'$(basename $p)'"... '
git apply "$p" && echo $done_text if git apply "$p"
then
echo $done_text
else
patch_conflict_detected
fi
done done
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment