Skip to content

Commit dcd30dd

Browse files
Merge pull request #27 from Preponderous-Software/release/v2.1
Release/v2.1
2 parents 7827d01 + 6a55104 commit dcd30dd

File tree

5 files changed

+77
-4
lines changed

5 files changed

+77
-4
lines changed

install.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
mkdir /usr/games
2+
3+
apt-get update
4+
apt-get install git
5+
cd /usr/games && git clone https://www.github.com/Preponderous-Software/FishE
6+
7+
echo "cd /usr/games/FishE && ./run.sh" > /bin/fishe
8+
chmod +x /usr/games/FishE/run.sh
9+
chmod +x /bin/fishe
10+
11+
echo "Installation complete. Type 'fishe' to play."
12+

run.sh

100644100755
Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1-
# !/bin/bash
1+
# /bin/bash
2+
# Usage: ./run.sh
23

3-
python src/fishE.py
4+
getLatest() {
5+
# get the latest version of the code
6+
echo "Pulling latest version of code from GitHub"
7+
git pull
8+
echo ""
9+
}
10+
11+
printBranchStatus() {
12+
# print the current branch
13+
echo "Current branch: $(git branch --show-current)"
14+
echo ""
15+
}
16+
17+
printVersion() {
18+
# print the current version
19+
echo "Current version: $(cat version.txt)"
20+
echo ""
21+
}
22+
23+
# checkDependencies() {
24+
# # check that dependencies are installed
25+
# echo "Checking dependencies"
26+
# if ! command -v python &> /dev/null
27+
# then
28+
# echo "Python could not be found. Download it from https://www.python.org/downloads/"
29+
# exit
30+
# fi
31+
# if ! command -v pip &> /dev/null
32+
# then
33+
# echo "Pip could not be found. Download it from https://pip.pypa.io/en/stable/installation/ or run 'python -m ensurepip' in a terminal"
34+
# exit
35+
# fi
36+
# pip install pygame --pre --quiet
37+
# pip install -r requirements.txt --quiet
38+
# echo ""
39+
# }
40+
41+
runTests() {
42+
# run tests
43+
echo "Running tests"
44+
python3 -m pytest
45+
echo ""
46+
}
47+
48+
startProgram() {
49+
# start program
50+
echo "Starting program"
51+
python3 src/fishE.py
52+
}
53+
54+
# main
55+
getLatest
56+
printBranchStatus
57+
printVersion
58+
# checkDependencies
59+
runTests
60+
startProgram

test.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Usage: ./test.sh
33

44
# generate coverage file named "cov.xml"
5-
python -m pytest --verbose -vv --cov=src --cov-report=term-missing --cov-report=xml:cov.xml
5+
python3 -m pytest --verbose -vv --cov=src --cov-report=term-missing --cov-report=xml:cov.xml

uninstall.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rm -rf /usr/games/FishE
2+
rm /bin/fishe
3+
4+
echo "FishE has been uninstalled."

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-SNAPSHOT
1+
2.1.0

0 commit comments

Comments
 (0)