This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows/extract-sage-local.sh: Use PREFIX
- Loading branch information
Matthias Koeppe
committed
Dec 18, 2020
1 parent
05d57c0
commit d87e160
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# to be run from $SAGE_ROOT, with arguments sage-local-${{ env.PREVIOUS_STAGES }}.tar | ||
|
||
if [ -z "$PREFIX" ]; then | ||
PREFIX=$(pwd)/local | ||
fi | ||
|
||
# Show all tar files | ||
ls -l $* | ||
|
||
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. | ||
for a in $*; do | ||
echo Extracting $a | ||
tar xf $a | ||
(cd / && tar xf -) < $a | ||
rm -f $a | ||
done | ||
|
||
# Also get rid of the stages that were not extracted | ||
rm -f sage-local-*.tar | ||
|
||
# We set the installation records to the same mtime so that no rebuilds due to dependencies | ||
# among these packages are triggered. | ||
(cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *) | ||
(cd "$PREFIX"/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *) | ||
|
||
# Show what has been built already. | ||
ls -l local local/var/lib/sage/installed/ | ||
ls -l "$PREFIX" "$PREFIX"/local/var/lib/sage/installed/ | ||
df -h | ||
|
||
# Rebase! | ||
src/bin/sage-rebase.sh local | ||
src/bin/sage-rebase.sh "$PREFIX" |