Commit 898395c99f64524bef1fba8c3cf93ec1fd4b58ef

Thomas de Grivel 2023-01-11T10:38:07

shpkg

diff --git a/.gitignore b/.gitignore
index 4f00cd9..4dc038a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,6 @@
+/bin/
+/include/
+/lib/
+/share/
 /src/
+/var/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..eeb6f1f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+# shpkg
+
+## Usage
+
+```
+Usage: shpkg OPERATION PKG ...
+
+Source directory operations :
+ clone          shortcut for git clone
+ fetch          shortcut for git fetch
+ pull           shortcut for git pull
+ remove | rm    shortcut for uninstall and rm -rf repo
+
+Compilation operations :
+ autogen        shortcut for ./autogen
+ configure      shortcut for ./configure
+ clean          shortcut for make clean
+ build          shortcut for make
+
+Package operations :
+ fake           install compiled sources into fake directory
+ package        build package from sources
+ install        install package
+ upgrade        pull sources, build package and install
+ uninstall      uninstall package
+```
+
+To install a package, for example "c3" :
+```
+$ shpkg install c3
+Cloning into 'c3' ...
+```
+
+Upgrading a package :
+```
+$ shpkg upgrade c3
+Counting remote objects ...
+```
+
+Updating sources for a package :
+```
+$ shpkg pull c3
+Counting remote objects ...
+```
diff --git a/bin/shpkg b/bin/shpkg
index b0ca32a..5587022 100755
--- a/bin/shpkg
+++ b/bin/shpkg
@@ -48,5 +48,26 @@ elif [ "x$1" = "xupgrade" ]; then
     exit
 fi
 
-echo "Usage: $0 (clone|fetch|pull|remove) PKG ..." >&2
+echo "Usage: shpkg OPERATION PKG ...
+
+Source directory operations :
+ clone          shortcut for git clone
+ fetch          shortcut for git fetch
+ pull           shortcut for git pull
+ remove | rm    shortcut for uninstall and rm -rf repo
+
+Compilation operations :
+ autogen        shortcut for ./autogen
+ configure      shortcut for ./configure
+ clean          shortcut for make clean
+ build          shortcut for make
+
+Package operations :
+ fake           install compiled sources into fake directory
+ package        build package from sources
+ install        install package
+ upgrade        pull sources, build package and install
+ uninstall      uninstall package
+" >&2
+
 exit 1