(
[ -n "$LOCATE" ] && which locate 1>/dev/null 2>&1 && locate $LOCATE &
if [ -n "$DIRS" -a -n "$DAYS" ]; then
- eval find $DIRS -mindepth 1 -type f -mtime $DAYS
+ eval find $DIRS -mindepth 1 -not -type d -mtime $DAYS
eval find $DIRS -mindepth 1 -type d -mtime $DAYS -empty -prune
fi
) 2>/dev/null | while IFS= read -r path; do
#################################################################################
type -P which > /dev/null || which() { type -P "$1" 2>&1; }
type -P nproc > /dev/null || nproc() {
- case "$OSTYPE" in
- darwin*) sysctl -n hw.ncpu ;;
- *) awk '/^processor/ {++n} END {print n}' /proc/cpuinfo ;;
- esac
+ case "$OSTYPE" in
+ darwin*) sysctl -n hw.ncpu ;;
+ *) awk '/^processor/ {++n} END {print n}' /proc/cpuinfo ;;
+ esac
}
nb_repos() {
# Realpath
#ls -d1 $(grep -v '^ *\(#\|$\)' "$conf") 2>/dev/null
- local IFS="
-"
- for dir in $(eval ls -d1 $(grep -v '^ *\(#\|$\)' "$conf") 2>/dev/null); do
+# NB 22.02.19 local IFS="
+# NB 22.02.19 "
+# NB 22.02.19 for dir in $(eval ls -d1 $(grep -v '^ *\(#\|$\)' "$conf") 2>/dev/null); do
+ eval ls -d1 $(grep -v '^ *\(#\|$\)' "$conf") 2>/dev/null | while read dir; do
# Accept directories or files (ex: use to tag a directory: .nb-install)
[ -f "$dir" ] && dir=$(dirname "$dir")
--- /dev/null
+case "$OSTYPE" in linux*) [ 1 ] ;; *) return ;; esac
+
+modprobe_ls() {
+ find /lib/modules/$(uname -r) -type f -name '*.ko' | sed -E -e 's,^.*/([^/]+)\.ko$,\1,'
+}