<h2 id="unix-like">Unix-like</h2>
<p>Install over the existing installation with the same sources, recording installed files, then delete them.</p>
-<div class="highlight"><pre>sudo python setup.py install --record files.txt
+<div class="highlight"><pre><span></span>sudo python setup.py install --record files.txt
<span class="c1"># inspect files.txt to make sure it looks ok. Then in bash:</span>
tr <span class="s1">'\n'</span> <span class="s1">'\0'</span> < files.txt <span class="p">|</span> xargs -0 sudo rm -f --
</pre></div>
<h2 id="windows">Windows</h2>
<p>Install on top of the existing installation with a windows installer, then add-remove programs to uninstall.</p>
-<div class="highlight"><pre>python setup.py bdist_wininst
+<div class="highlight"><pre><span></span>python setup.py bdist_wininst
dist/foo-1.0.win32.exe
</pre></div>
<h2 id="use-other-methods-which-fully-support-uninstall-when-available">Use other methods which fully support uninstall when available</h2>
source /a/bin/errhandle/err
usage() {
- cat <<EOF
+ cat <<EOF
Usage: ${0##*/} [OPTIONS] [DOMAIN_NAME] [LETSENCRYPT_EMAIL]
Setup dependencies, apache, and gitweb. Then call build.rb.
Note: Uses GNU getopt options parsing style
EOF
- exit $1
+ exit $1
}
##### begin command line parsing ########
+
port=443
-temp=$(getopt -l help, p:h "$@") || usage 1
+temp=$(getopt -l help, sp:h "$@") || usage 1
eval set -- "$temp"
while true; do
- case $1 in
- -p) port=$2; shift 2 ;;
- -h|--help) usage ;;
- --) shift; break ;;
- *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
- esac
+ case $1 in
+ -s) allow_symlinks_arg=-s; shift ;;
+ -p) port=$2; shift 2 ;;
+ -h|--help) usage ;;
+ --) shift; break ;;
+ *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
+ esac
done
##### end command line parsing ########
email=$2
if [[ $email ]]; then
email_arg="-e $email"
- fi
+fi
gitroot=/a/bin/githtml
if [[ $EUID != 0 ]]; then
- s=sudo
+ s=sudo
fi
deb8=false
if grep -xFq 'VERSION_ID="8"' /etc/os-release; then
- deb8=true
+ deb8=true
fi
shopt -s extglob
pkgs=(
- # build.rb dependencies
- ruby-pygments.rb ruby-safe-yaml ruby-sass
- # python pkgs used for o(n^2) voting blog entry
- python-bcrypt python-passlib
- # gitweb pkgs
- gitweb highlight
+ # build.rb dependencies
+ ruby-pygments.rb ruby-safe-yaml ruby-sass
+ # python pkgs used for o(n^2) voting blog entry
+ python-bcrypt python-passlib
+ # gitweb pkgs
+ gitweb highlight
)
if $deb8; then
- pkgs+=(build-essential ruby-dev)
+ pkgs+=(build-essential ruby-dev)
else
- pkgs+=(ruby-redcarpet)
+ pkgs+=(ruby-redcarpet)
fi
-
-$s apt-get -y install ${pkgs[@]}
+source /a/bin/distro-functions/src/package-manager-abstractions
+pi ${pkgs[@]}
if $deb8; then
- sudo gem install redcarpet
+ sudo gem install redcarpet
fi
chmod og+x _site/on2vote/vote.py
our \$projects_list_group_categories = 1;
EOF
-web-conf $email_arg -p $port - apache2 $domain <<EOF
+web-conf $allow_symlinks_arg $email_arg -p $port - apache2 $domain <<EOF
# to run python script on my site:
<Directory /var/www/$domain/html/on2vote>
# to run python scripts with cgi