File: install.dist.sh

package info (click to toggle)
golang-github-multiformats-go-multihash 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 376 kB
  • sloc: sh: 138; makefile: 39
file content (21 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

bin=multihash

# this script is currently brain dead.
# it merely tries two locations.
# in the future maybe use value of $PATH.

binpath=/usr/local/bin
if [ -d "$binpath" ]; then
  mv "$bin" "$binpath/$bin"
  echo "installed $binpath/$bin"
  exit 0
fi

binpath=/usr/bin
if [ -d "$binpath" ]; then
  mv "$bin" "$binpath/$bin"
  echo "installed $binpath/$bin"
  exit 0
fi