summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2021-09-30 01:01:56 -0400
committerAndrew Cady <d@jerkface.net>2021-09-30 01:01:56 -0400
commite9c7314a992c4a0ac60f7deaa7c136a01a2de67f (patch)
tree21443a39e2ba245c87dea475c4e04e287c7d69c3
parentf4496d76a495d012af7ae55856d2fcfedae4a3ea (diff)
package name changed to cryptonomic
-rw-r--r--selfpublish.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/selfpublish.sh b/selfpublish.sh
index 9bb3b20..660c7f8 100644
--- a/selfpublish.sh
+++ b/selfpublish.sh
@@ -164,11 +164,12 @@ control_file_file_check()
164 164
165SELF_VERSION='0.1' 165SELF_VERSION='0.1'
166SELF_EXECUTABLE=$(realpath "$0") 166SELF_EXECUTABLE=$(realpath "$0")
167SELF_PACKAGE=cryptonomic
167control_file() 168control_file()
168{ 169{
169 cat <<EOF 170 cat <<EOF
170Version: ${SELF_VERSION} 171Version: ${SELF_VERSION}
171Package: selfpublish-dot-sh 172Package: ${SELF_PACKAGE}
172Description: selfpublish.sh dependency package 173Description: selfpublish.sh dependency package
173 This package depends on the dependencies of the 174 This package depends on the dependencies of the
174 selfpublish.sh script, and is installed by that 175 selfpublish.sh script, and is installed by that
@@ -176,7 +177,7 @@ Description: selfpublish.sh dependency package
176EOF 177EOF
177 dependencies | fmt_dependencies 178 dependencies | fmt_dependencies
178# cat <<EOF 179# cat <<EOF
179# File: /usr/share/doc/selfpublish-dot-sh/README.Debian 644 180# File: /usr/share/doc/${SELF_PACKAGE}/README.Debian 644
180# This gets overwritten :( 181# This gets overwritten :(
181# EOF 182# EOF
182 control_file_file /usr/lib/cryptonomic/cryptonomic-ipv4 755 <<'EOF' 183 control_file_file /usr/lib/cryptonomic/cryptonomic-ipv4 755 <<'EOF'
@@ -498,17 +499,17 @@ control_file_unchanged()
498 ( 499 (
499 destdir=$(mktemp -d) 500 destdir=$(mktemp -d)
500 trap 'rm -r "$destdir"' EXIT 501 trap 'rm -r "$destdir"' EXIT
501 [ "$(dpkg-query -f '${Version}' -W selfpublish-dot-sh)" = "${SELF_VERSION}" ] || return 502 [ "$(dpkg-query -f '${Version}' -W ${SELF_PACKAGE})" = "${SELF_VERSION}" ] || return
502 503
503 dependencies > want-dependencies 504 dependencies > want-dependencies
504 dpkg-query -f '${Depends}\n' -W selfpublish-dot-sh | sed 's/, */\n/g' | sort -u > have-dependencies 505 dpkg-query -f '${Depends}\n' -W "${SELF_PACKAGE}" | sed 's/, */\n/g' | sort -u > have-dependencies
505 diff -q want-dependencies have-dependencies 506 diff -q want-dependencies have-dependencies
506 ) 507 )
507} 508}
508 509
509equivocate() 510equivocate()
510{ 511{
511 if dpkg-query -s selfpublish-dot-sh | grep -q '^Status: install ok installed' 2>/dev/null 512 if dpkg-query -s "${SELF_PACKAGE}" | grep -q '^Status: install ok installed' 2>/dev/null
512 then 513 then
513 if control_file_unchanged && control_file | control_file_file_check 514 if control_file_unchanged && control_file | control_file_file_check
514 then 515 then
@@ -523,11 +524,11 @@ equivocate()
523 cd "$destdir" 524 cd "$destdir"
524 control_file > ./control 525 control_file > ./control
525 equivs-build ./control >&2 526 equivs-build ./control >&2
526 DEB=selfpublish-dot-sh_${SELF_VERSION}_all.deb 527 DEB=${SELF_PACKAGE}_${SELF_VERSION}_all.deb
527 528
528 if ! [ "$NO_APT" ] 529 if ! [ "$NO_APT" ]
529 then 530 then
530 as_root dpkg -r selfpublish-dot-sh 531 as_root dpkg -r "${SELF_PACKAGE}"
531 dpkg_install "$DEB" 532 dpkg_install "$DEB"
532 install -m0644 "$DEB" "$DEBDEST" 533 install -m0644 "$DEB" "$DEBDEST"
533 fi 534 fi
@@ -724,7 +725,7 @@ install_self_to_site()
724 cp -Tuv "$src" "$dst" >&2 725 cp -Tuv "$src" "$dst" >&2
725 cp -Tuv "$src" "$dst".txt >&2 726 cp -Tuv "$src" "$dst".txt >&2
726 fi 727 fi
727 DEB="selfpublish-dot-sh_${SELF_VERSION}_all.deb" 728 DEB="${SELF_PACKAGE}_${SELF_VERSION}_all.deb"
728 if [ -e "$DEB" ] 729 if [ -e "$DEB" ]
729 then 730 then
730 cp -Tuv "$DEB" "$SITE_DIR/public_html/$DEB" 731 cp -Tuv "$DEB" "$SITE_DIR/public_html/$DEB"
@@ -789,7 +790,7 @@ configure_apache_vhost()
789 790
790install_header_to_site() 791install_header_to_site()
791{ 792{
792 cat > "$SITE_DIR"/public_html/HEADER.html <<EOF 793 cat > "$SITE_DIR"/public_html/HEADER.html <<'EOF'
793<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 794<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
794<html> 795<html>
795 <head> 796 <head>