diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-09-15 12:06:23 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-09-15 12:06:51 +0200 |
commit | faeb5e8ccc6dd363874e29e566f0f2b2d596bc08 (patch) | |
tree | d3d6e76db4965be8c84d1b3bae76a3e0d4fa0bfb | |
parent | 4cfbdda0ef2dd23debbb22d7ee74ceba81a0040a (diff) |
bin/up: switch to the new fshare-based up service
Use the same script for up and ups.
-rwxr-xr-x | bin/up | 10 | ||||
-rwxr-xr-x | bin/ups | 4 | ||||
-rw-r--r-- | install.conf.yaml | 4 |
3 files changed, 6 insertions, 12 deletions
@@ -1,10 +0,0 @@ -#!/bin/bash -# up.khirnov.net 0x0 instance -if [ "$1" ]; then - fpath=$1 -else - fpath="-" -fi - -url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fpath}" "https://up.khirnov.net/") -[ "${url}" ] && echo "${url}" @@ -16,7 +16,9 @@ try: except ImportError: have_magic = False -server = 'https://ups.khirnov.net/' +progname = os.path.basename(sys.argv[0]) +service = 'up' if progname == 'up' else 'ups' +server = 'https://%s.khirnov.net/' % service cert_path = os.path.expanduser('~/.local/var/up/cert') parser = argparse.ArgumentParser() diff --git a/install.conf.yaml b/install.conf.yaml index 5eacb0d..756c5e6 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -16,7 +16,9 @@ - link: ~/.local/bin/diff-highlight: bin/diff-highlight - ~/.local/bin/up: bin/up + ~/.local/bin/up: + relink: True + path: bin/ups ~/.local/bin/ups: bin/ups ~/.config/bash/prompt: bash/prompt ~/.bashrc: bash/bashrc |