summaryrefslogtreecommitdiffstats
path: root/build/pkgs/python_igraph/spkg-src
blob: 44c3d5193405f60bb99e4f1b9fca2781d6b3dddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash

# This script must be run from folder SAGE_ROOT. It modifies the file
# python-igraph-0.7.0.tar.gz into python_igraph-0.7.0.tar.gz, and it modifies
# the name of the top folder accordingly.

if [ -e upstream/python_igraph-0.7.0.tar.gz ]
then
    echo "The modified .tar file already exists."
    exit
fi

if [ -e upstream/python-igraph-0.7.0.tar.gz ]
then
    tar -zxf upstream/python-igraph-0.7.0.tar.gz -C local/var/tmp/sage/build/
    cd local/var/tmp/sage/build
    mv python-igraph-0.7.0 python_igraph-0.7.0
    tar -zcf python_igraph-0.7.0.tar.gz python_igraph-0.7.0
    rm -rf python_igraph-0.7.0
    cd ../../../../..
    mv local/var/tmp/sage/build/python_igraph-0.7.0.tar.gz upstream/python_igraph-0.7.0.tar.gz
    rm upstream/python-igraph-0.7.0.tar.gz
    ./sage -sh sage-fix-pkg-checksums
    echo "Correctly modified .tar file."
else
    echo "File python-igraph-0.7.0.tar.gz not found in folder upstream."
fi