File: install-scripts.sh

package info (click to toggle)
notion 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,656 kB
  • sloc: ansic: 47,365; sh: 2,093; makefile: 594; perl: 270
file content (30 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# by Dan Weiner <dbw@uchicago.edu>
# Public Domain

# This script will install the scripts in SCRIPT_DIRS, via symlinks,
# to INSTALL_LOCATION.

# Make sure INSTALL_LOCATION doesn't contain anything important.
# It may get overwritten!

INSTALL_LOCATION="$HOME/.notion/lib"
SCRIPT_DIRS="keybindings scripts statusbar statusd styles"

########################################################################

for DIR in $SCRIPT_DIRS ; do
        [ -d $DIR ] && continue
        echo "$0: error: missing $DIR/." > /dev/stderr ; exit 1
done

mkdir -p "$INSTALL_LOCATION" || exit 1
find $SCRIPT_DIRS -type f |\
        while read FILE ; do
                echo "$FILE"
                ln -s -f "$PWD/$FILE" "$INSTALL_LOCATION" && continue
                echo "$0: error: ln returned $?." > /dev/stderr ; exit 1
        done

exit 0