first attempt for debian10 Slax

This commit is contained in:
TomasM
2019-10-19 19:02:17 +00:00
parent 7bca13b9a6
commit 32afaf7f89
224 changed files with 3924 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
LOCK=/run/lock/gtk-bookmark-update-lock
BOOKMARKS=/root/.gtk-bookmarks
# make sure to avoid parallel execution by using mkdir as lock
while true; do
mkdir $LOCK 2>/dev/null
if [ $? = 0 ]; then
break
fi
done
cat $BOOKMARKS | fgrep -v ///media/ | fgrep -v "file:/// /" | egrep -v '^$' > $BOOKMARKS.tmp 2>/dev/null
ls -1 /media | sort | while read LINE; do
echo "file:///media/$LINE $LINE" >> $BOOKMARKS.tmp
done
echo "file:/// /" >> $BOOKMARKS.tmp # add root at the beginning
mv -f $BOOKMARKS.tmp $BOOKMARKS
rmdir $LOCK