@@ -17,7 +17,7 @@ echo "Checking for root..."
17
17
18
18
# Make sure we have everything actually installed that we need to install this.
19
19
echo " Checking for Dependencies..."
20
- assertInstalled bash curl tar mktemp
20
+ assertInstalled bash curl tar mktemp install make
21
21
22
22
# Variable Definitions go here.
23
23
user_home=` eval echo ~ $SUDO_USER `
@@ -26,22 +26,8 @@ extract_dir=$(mktemp -d /tmp/notes.XXXXX)
26
26
27
27
echo " Downloading and Extracting Notes from Repository..."
28
28
curl -L https://api.github.com/repos/pimterry/notes/tarball | tar -xzp -C $extract_dir --strip-components=1
29
-
30
- echo " Moving Files into Place..."
31
- mv $extract_dir /notes /usr/local/bin/notes
32
- # Make it runnable
33
- # Do we have bash completion abilities?
34
- if [ -d $bash_completion_dir ]; then
35
- mv $extract_dir /notes.bash_completion $bash_completion_dir /notes
36
- fi
37
- mkdir -p $user_home /.config/notes/
38
- mv $extract_dir /config.example $user_home /.config/notes/config.example
39
- mv $extract_dir /notes.1 /usr/local/share/man/man1/notes.1
40
- echo " Fixing Permissions..."
41
- chown -R $SUDO_USER $user_home /.config/notes
42
- chmod a+x /usr/local/bin/notes
43
- echo " Installing Man page..."
44
- mandb
29
+ echo " Installing notes..."
30
+ cd $extract_dir && make USER_DIR=$user_home
45
31
echo " Cleaning Up..."
46
32
rm -rf $extract_dir
47
33
echo " All done."
0 commit comments