summaryrefslogtreecommitdiff
path: root/src/query.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/query.sh')
-rw-r--r--src/query.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/query.sh b/src/query.sh
index d5571b0..7292434 100644
--- a/src/query.sh
+++ b/src/query.sh
@@ -1,7 +1,16 @@
#!/bin/sh
+
+list () {
+ find ${PACKAGES_DIR} -type f | sed "s,${PACKAGES_DIR}/,,"
+}
+
+list_installed () {
+ ls -1 ${INSTALLED_DIR}
+}
+
search () {
- find ${PACKAGES_DIR} -type f | sed "s,${PACKAGES_DIR}/,," | grep $(echo $@ | sed "s/ /\\|/g")
+ list | grep $(echo $@ | sed "s/ /\\|/g")
}
files () {
@@ -11,7 +20,7 @@ files () {
done
}
-file () {
+file_info () {
for file in $@; do
[ ! -f ${SYSROOT}$file ] && file=$(realpath $file)
for list in ${INSTALLED_DIR}/*/files; do
@@ -21,3 +30,4 @@ file () {
done
done
}
+