-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·31 lines (28 loc) · 1.03 KB
/
install.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
#!/bin/bash
# this script installs pypelines into /usr/local on the cluster nodes
# since the cluster nodes do not have root write access to the network
# volumes from nodes other than node 9, sudo ... doesn't work with
# setuptools because it writes egg_info to the source directory and I
# can't figure out how to get it to write to a local directory.
#
# this script copies the entire pypeline source tree to /tmp on the
# local machine, runs sudo ./setup.py install --prefix=/usr/local, and,
# on success, deletes the temporary source directory
#
# it _must_ be run from the source directory
TMPDIR="/tmp/reStUtil_tmp_$(date +%F)"
if [ ! -d $TMPDIR ]; then
echo "temporary source dir $TMPDIR does not exist, creating"
mkdir $TMPDIR
fi
cd ../
echo "copying source tree to $TMPDIR"
cp -vr -t $TMPDIR python-reStUtil/{setup,reStUtil}.py
cd $TMPDIR
echo "cd'ed to $PWD, installing"
sudo ./setup.py install --prefix=/usr/local
if [ $? -eq 0 ]; then
echo "install successful, removing $TMPDIR"
cd
sudo rm -r $TMPDIR
fi