File: generate.sh

package info (click to toggle)
dotdrop 1.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,812 kB
  • sloc: sh: 13,401; python: 8,186; makefile: 3
file content (24 lines) | stat: -rwxr-xr-x 635 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# author: deadc0de6 (https://github.com/deadc0de6)
# Copyright (c) 2023, deadc0de6

# get current working directory
cur=$(cd "$(dirname "${0}")" && pwd)

# extract version from git latest tag
#version=$(git describe --tags --abbrev=0)
# extract version from version.py
version=$(grep version "${cur}"/../dotdrop/version.py | sed 's/^.*= .\(.*\).$/\1/g')

if ! hash txt2man 2>/dev/null; then
  echo "install txt2man"
  exit 1
fi

txt2man \
  -t "dotdrop" \
  -P "dotdrop" \
  -r "dotdrop-${version}" \
  -s 1 \
  -v "Save your dotfiles once, deploy them everywhere" \
  "${cur}/dotdrop.txt2man" > "${cur}/dotdrop.1"