Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
.github/workflows/extract-sage-local.sh: Use PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 18, 2020
1 parent 05d57c0 commit d87e160
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/extract-sage-local.sh
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"

0 comments on commit d87e160

Please sign in to comment.