mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
add a get-up-and-running script
See: https://sourceforge.net/p/pysolfc/discussion/503709/thread/b37cd50f/
This commit is contained in:
parent
b265b28502
commit
94927cbbc0
2 changed files with 55 additions and 1 deletions
|
@ -54,6 +54,12 @@ After following steps similar to these (on
|
||||||
|
|
||||||
#### Step 1 - install the dependencies
|
#### Step 1 - install the dependencies
|
||||||
|
|
||||||
|
On Fedora you can do:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf builddep PySolFC
|
||||||
|
```
|
||||||
|
|
||||||
On Mageia you can do:
|
On Mageia you can do:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -75,7 +81,7 @@ cd PySolFC
|
||||||
gmake test
|
gmake test
|
||||||
gmake rules
|
gmake rules
|
||||||
ln -s data/images images
|
ln -s data/images images
|
||||||
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Need to be downloaded from sourceforge
|
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Needs to be downloaded from sourceforge
|
||||||
mkdir -p ~/.PySolFC
|
mkdir -p ~/.PySolFC
|
||||||
rmdir ~/.PySolFC/cardsets
|
rmdir ~/.PySolFC/cardsets
|
||||||
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
|
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
|
||||||
|
|
48
scripts/linux-install.py
Executable file
48
scripts/linux-install.py
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#! /usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:fenc=utf-8
|
||||||
|
#
|
||||||
|
# Copyright © 2020 Shlomi Fish < https://www.shlomifish.org/ >
|
||||||
|
#
|
||||||
|
# Licensed under the terms of the MIT license.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
import subprocess
|
||||||
|
from subprocess import check_call
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
os.environ['TEST_TAGS'] = " SKIP_GTK SKIP_PY2 "
|
||||||
|
try:
|
||||||
|
subprocess.check_call(["gmake", "test", "rules"])
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
subprocess.check_call(["make", "test", "rules"])
|
||||||
|
|
||||||
|
if not os.path.exists("./images"):
|
||||||
|
os.symlink("./data/images/", "./images")
|
||||||
|
home = os.environ['HOME']
|
||||||
|
dot_pysol = home + "/.PySolFC"
|
||||||
|
dot_pysol_cardsets = dot_pysol + "/cardsets"
|
||||||
|
if not os.path.exists("./images"):
|
||||||
|
os.symlink("./data/images/", "./images")
|
||||||
|
if not os.path.exists(dot_pysol):
|
||||||
|
os.mkdir(dot_pysol)
|
||||||
|
if not os.path.exists(dot_pysol_cardsets):
|
||||||
|
cardsets_dir = "PySolFC-Cardsets-2.0"
|
||||||
|
if not os.path.exists(cardsets_dir):
|
||||||
|
arc = cardsets_dir + ".tar.gz"
|
||||||
|
if not os.path.exists(arc):
|
||||||
|
check_call([
|
||||||
|
"wget",
|
||||||
|
"https://github.com/shlomif/" +
|
||||||
|
"PySolFC-Cardsets/archive/2.0/" + arc])
|
||||||
|
subprocess.check_call(["tar", "-xvf", arc])
|
||||||
|
os.symlink(dot_pysol_cardsets, os.getcwd() + "/" + cardsets_dir)
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
Loading…
Add table
Reference in a new issue