indent and minor formatting
authorIan Kelling <iank@fsf.org>
Fri, 3 Jul 2020 21:43:27 +0000 (17:43 -0400)
committerIan Kelling <iank@fsf.org>
Fri, 3 Jul 2020 21:43:27 +0000 (17:43 -0400)
_site/technical-notes/router-arris-sb8200-source-code.html
_site/technical-notes/setup.py-uninstall.html
setup.sh

index 67f792325c58209035851666a2cf7e2a55727c28..4af7e6c63904a7315c44311bdaeb487ed9162533 100644 (file)
@@ -22,7 +22,7 @@ in 2017. I&#39;ve copied this from the web interface of the modem and
 publishing it here since I do not see it anywhere else online. At the
 bottom, there are a bunch of license texts and copyright holder notices
 that I&#39;ve omitted.</p>
 publishing it here since I do not see it anywhere else online. At the
 bottom, there are a bunch of license texts and copyright holder notices
 that I&#39;ve omitted.</p>
-<div class="highlight"><pre>Open Source Software Information
+<div class="highlight"><pre><span></span>Open Source Software Information
 
 For instructions on how to obtain a copy of any source code being made publicly available by ARRIS related to software used in this ARRIS product you may send your request in writing to:
 
 
 For instructions on how to obtain a copy of any source code being made publicly available by ARRIS related to software used in this ARRIS product you may send your request in writing to:
 
index 5c870181e3cf91d4bb39c812d0e7ba1a9c668fa9..625f01ee4f381dbd2995e77976841ecbcde5c152 100644 (file)
 <h2 id="unix-like">Unix-like</h2>
 
 <p>Install over the existing installation with the same sources, recording installed files, then delete them.</p>
 <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">&#39;\n&#39;</span> <span class="s1">&#39;\0&#39;</span> &lt; 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>
 <span class="c1"># inspect files.txt to make sure it looks ok. Then in bash:</span>
 tr <span class="s1">&#39;\n&#39;</span> <span class="s1">&#39;\0&#39;</span> &lt; 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>
 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>
index cd4dfaa3358e99e49435790293423e9c06551e52..5452793a6a3cce6094d307773de33ab55c8297c7 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -17,7 +17,7 @@
 source /a/bin/errhandle/err
 
 usage() {
 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.
 
 Usage: ${0##*/} [OPTIONS] [DOMAIN_NAME] [LETSENCRYPT_EMAIL]
 Setup dependencies, apache, and gitweb. Then call build.rb.
 
@@ -33,21 +33,23 @@ and basic-https-conf.
 
 Note: Uses GNU getopt options parsing style
 EOF
 
 Note: Uses GNU getopt options parsing style
 EOF
-    exit $1
+  exit $1
 }
 
 ##### begin command line parsing ########
 
 }
 
 ##### begin command line parsing ########
 
+
 port=443
 port=443
-temp=$(getopt -l help, p:h "$@") || usage 1
+temp=$(getopt -l help, sp:h "$@") || usage 1
 eval set -- "$temp"
 while true; do
 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 ########
 done
 
 ##### end command line parsing ########
@@ -60,16 +62,16 @@ domain=${1:-iankelling.org} # use argument for testing site
 email=$2
 if [[ $email ]]; then
   email_arg="-e $email"
 email=$2
 if [[ $email ]]; then
   email_arg="-e $email"
-  fi
+fi
 gitroot=/a/bin/githtml
 
 if [[ $EUID != 0 ]]; then
 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
 fi
 
 deb8=false
 if grep -xFq 'VERSION_ID="8"' /etc/os-release; then
-    deb8=true
+  deb8=true
 fi
 
 shopt -s extglob
 fi
 
 shopt -s extglob
@@ -80,22 +82,22 @@ type -P ffmpeg &>/dev/null || $s apt-get -y install ffmpeg
 
 
 pkgs=(
 
 
 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
 )
 if $deb8; then
-    pkgs+=(build-essential ruby-dev)
+  pkgs+=(build-essential ruby-dev)
 else
 else
-    pkgs+=(ruby-redcarpet)
+  pkgs+=(ruby-redcarpet)
 fi
 fi
-
-$s apt-get -y install ${pkgs[@]}
+source /a/bin/distro-functions/src/package-manager-abstractions
+pi ${pkgs[@]}
 if $deb8; then
 if $deb8; then
-    sudo gem install redcarpet
+  sudo gem install redcarpet
 fi
 chmod og+x _site/on2vote/vote.py
 
 fi
 chmod og+x _site/on2vote/vote.py
 
@@ -141,7 +143,7 @@ our \$home_text = "$script_dir/_site/gitweb_home.html";
 our \$projects_list_group_categories = 1;
 EOF
 
 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
 # to run python script on my site:
 <Directory /var/www/$domain/html/on2vote>
   # to run python scripts with cgi