mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-17 11:20:58 +01:00
rm bashisms, applied port patch
This commit is contained in:
@@ -11,14 +11,11 @@
|
||||
# compliant regular expression.
|
||||
#
|
||||
|
||||
dbtool="/usr/bin/dbtool";
|
||||
find="/usr/bin/find";
|
||||
db="/var/local/locate.db";
|
||||
sort="/bin/sort";
|
||||
regex=$1;
|
||||
db="/var/db/locate.db"
|
||||
regex=$1
|
||||
|
||||
if [ "x$regex" != "x" ]; then
|
||||
$dbtool -d $db -S -k $regex -w -R;
|
||||
if test -n "$regex"; then
|
||||
dbtool -d $db -S -k $regex -w -R
|
||||
else
|
||||
echo "Usage: locate <expression>";
|
||||
echo "Usage: locate <expression>"
|
||||
fi
|
||||
|
||||
@@ -9,11 +9,7 @@
|
||||
# to search for a certain string.
|
||||
#
|
||||
|
||||
dbtool="/usr/bin/dbtool";
|
||||
find="/usr/bin/find";
|
||||
db="/var/local/locate.db";
|
||||
egrep="/bin/egrep";
|
||||
cp="/bin/cp"
|
||||
db="/var/db/locate.db";
|
||||
|
||||
$cp /dev/null $db;
|
||||
$find / -ls | $egrep -v "^\/proc|dev|tmp" | $dbtool -d $db -i -f -R -t "^(.+?) (\/.*)$";
|
||||
echo -n > $db
|
||||
find / -ls | egrep -v "^\/proc|dev|tmp" | dbtool -d $db -i -f -R -t "^(.+?) (\/.*)$";
|
||||
|
||||
Reference in New Issue
Block a user