forked from warehouseman/meteor-tinytest-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebuild-meteor-tinytest-runner-installer.sh
executable file
·61 lines (55 loc) · 1.64 KB
/
rebuild-meteor-tinytest-runner-installer.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
#
# This script plays no part in Meteor Tinytest Runner.
# Instead it used to facilitate packaging up and testing
# the installer and uninstaller of Meteor Tinytest Runner.
#
installIfNotInstalled () {
PKG=$1
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ${PKG} 2>/dev/null | grep "install ok installed")
echo "Checking for ${PKG}: ${PKG_OK}"
if [ "" == "${PKG_OK}" ]; then
echo "No ${PKG}. Please run the following command: "
echo "sudo apt-get install ${PKG}"
exit 1;
fi
echo;
}
meteorProjIfNotMeteorProj () {
echo "Checking for a Meteor project.";
if [ ! -d "projMeteor" ]; then
echo "Making a Meteor project.";
meteor create projMeteor
cd projMeteor
meteor create --package yours:skeleton
cd ..
fi
}
installIfNotInstalled "makeself"
meteorProjIfNotMeteorProj
cp -R projMeteor tryMTRInst
mkdir -p meteor-tinytest-runner_bk
cp rebuild-meteor-tinytest-runner-installer.sh ./meteor-tinytest-runner
cp -R ./meteor-tinytest-runner/* ./meteor-tinytest-runner_bk/
cd ./meteor-tinytest-runner_bk/
rm -f LICENSE
rm -f README.md
rm -f rebuild-meteor-tinytest-runner-installer.sh
rm -f meteor-tinytest-runner.run
makeself --current . meteor-tinytest-runner.run "Installing meteor-tinytest-runner" ./install-meteor-tinytest-runner.sh
chmod a+x meteor-tinytest-runner.run
cp meteor-tinytest-runner.run ../tryMTRInst/
cp meteor-tinytest-runner.run ../meteor-tinytest-runner
cd ..
cd ./tryMTRInst
./meteor-tinytest-runner.run
tree
printf "Ready to test uninstall ? Hit <enter>."
read _
./tests/tinyTests/remove-meteor-tinytest-runner.sh
ls -l
printf "Done ? Hit <enter>."
read _
cd ..
rm -fr tryMTRInst
rm -fr meteor-tinytest-runner_bk