commit c57ea631f926a204c35c15aebb762a21c9a0309c
parent 56f7ffffc1bb299b23b2cadb00c640285845d8e6
Author: finwo <finwo@pm.me>
Date: Mon, 13 Nov 2017 21:31:02 +0100
Added license
Diffstat:
| M | dep | | | 42 | ++++++++++++++++++++++++++++++++++++------ |
| M | dep-repo | | | 16 | +++++++++++++++- |
2 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/dep b/dep
@@ -12,27 +12,57 @@ clean_conf () {
fi
}
+# Make sure the required stuff exists
+[ -d ~/.cdeps ] || mkdir -p ~/.cdeps
+[ -f ~/.cdeps/config ] || touch ~/.cdeps/config
+[ -f ~/.cdeps/repositories ] || touch ~/.cdeps/repositories
+
# Load the user's configuration
-[ -f ~/.cdeps/config ] && {
- clean_conf ~/.cdeps/config
- source ~/.cdeps/config
-}
+clean_conf ~/.cdeps/config
+source ~/.cdeps/config
case "$1" in
init)
- [ -d ~/.cdeps ] || mkdir -p ~/.cdeps
;;
add)
;;
install)
;;
+ help)
+ cat <<EOF
+
+LICENSE
+
+The MIT License (MIT)
+
+Copyright (c) 2017 Robin Bron
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+EOF
+ ;;
*)
# Check for user-defined
if command -v $0-$1 &>/dev/null; then
$0-$1 "${@:2}"
else
- echo "Usage: $0 (repo|init|add|install)"
+ echo "Usage: $0 (repo|init|add|install|help)"
exit 1
fi
;;
diff --git a/dep-repo b/dep-repo
@@ -1,9 +1,23 @@
#!/usr/bin/env bash
+# Make sure the required stuff exists
+[ -d ~/.cdeps ] || mkdir -p ~/.cdeps
+[ -f ~/.cdeps/repositories ] || touch ~/.cdeps/repositories
+
case "$1" in
list)
+ cat ~/.cdeps/repositories
+ ;;
+ add)
+
+ ;;
+ update)
+
+ ;;
+ remove)
+ ;;
*)
- echo "Usage: $0 ()"
+ echo "Usage: $0 (list|add|update|remove)"
exit 1
;;
esac