vim added, removed bads
parent
dc24a737a4
commit
d985108a22
|
@ -0,0 +1,6 @@
|
||||||
|
2f0839645ff12d6d6f8d0bb30697d116 ./buildlist.sh
|
||||||
|
46e10dbafa005dbda8f3c49f764a1be7 ./FILE_LIST
|
||||||
|
f776ee9d005619ec5f882f03d91f1575 ./ipmitool/ipmitool-1.8.18-x86_64-1.txz
|
||||||
|
8968209b48a0425de0a2157d2bdfddd5 ./vim/vim-7.4.1938-x86_64-1.txz
|
||||||
|
610d5b2c29c708e9a784b6008dbed5c9 ./CHECKSUMS.md5
|
||||||
|
a540f5e2df9d37b8266d876ce588223a ./powertop/powertop-2.14-x86_64-1.txz
|
|
@ -0,0 +1,9 @@
|
||||||
|
drwxrwxr-x 5 cdnutter cdnutter 4096 2022-09-30 22:04 .
|
||||||
|
-rw-rw-r-- 1 cdnutter cdnutter 369 2022-09-30 22:03 ./CHECKSUMS.md5
|
||||||
|
-rw-rw-r-- 1 cdnutter cdnutter 56 2022-09-30 22:04 ./FILE_LIST
|
||||||
|
drwxrwxr-x 2 cdnutter cdnutter 4096 2022-09-30 22:03 ./ipmitool
|
||||||
|
-rw-rw-r-- 1 cdnutter cdnutter 1028544 2022-09-30 22:03 ./ipmitool/ipmitool-1.8.18-x86_64-1.txz
|
||||||
|
drwxrwxr-x 2 cdnutter cdnutter 4096 2022-09-30 22:03 ./powertop
|
||||||
|
-rw-rw-r-- 1 cdnutter cdnutter 2126852 2022-09-30 22:03 ./powertop/powertop-2.14-x86_64-1.txz
|
||||||
|
drwxrwxr-x 2 cdnutter cdnutter 4096 2022-09-30 22:04 ./vim
|
||||||
|
-rw-rw-r-- 1 cdnutter cdnutter 6475660 2016-06-15 01:48 ./vim/vim-7.4.1938-x86_64-1.txz
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# USE AT YOUR OWN RISK!!!!!
|
||||||
|
#
|
||||||
|
# buildlist.sh
|
||||||
|
#
|
||||||
|
# Builds a recursive directory list file like the FILELIST.TXT that ships
|
||||||
|
# with Slackware Linux.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# Run ./buildlist.sh path/to/directory
|
||||||
|
# or ./buildlist.sh /path/to/directory /path/to/listfile
|
||||||
|
# listfile being the name of the new file that will be created, of course.
|
||||||
|
|
||||||
|
LISTFILE=FILE_LIST # Default listfile
|
||||||
|
CHECKFILE=CHECKSUMS.md5
|
||||||
|
# Uncomment one or the other, but not both
|
||||||
|
#SIZEOP=h # Use human readable sizes vs bytes (ie MB/KB)
|
||||||
|
SIZEOP="" # Use bytes for sizes
|
||||||
|
|
||||||
|
if test "$1" == ""; then
|
||||||
|
echo "Usage: $0 directory listfile(optional)"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
if test ! -d $1; then
|
||||||
|
echo "Error: $1 - No such directory..."
|
||||||
|
exit
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if test "$2" != ""; then
|
||||||
|
LISTFILE=$2
|
||||||
|
fi;
|
||||||
|
|
||||||
|
echo "Building \"${LISTFILE}\" from \"$1\""
|
||||||
|
|
||||||
|
date > ${LISTFILE}
|
||||||
|
cat <<- EOF >> ${LISTFILE}
|
||||||
|
|
||||||
|
Directory listing of $1
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
find ${1} -exec ls -dl${SIZEOP} --full-time {} \; \
|
||||||
|
| awk '{ printf("%10s %2s %4s %4s %8s %10s %-5.5s %s\n",$1,$2,$3,$4,$5,$6,$7,$9) }' > templist.txt
|
||||||
|
|
||||||
|
if [ -f ${LISTFILE} ]; then
|
||||||
|
rm -f ${LISTFILE}
|
||||||
|
fi
|
||||||
|
sort +7d templist.txt >> ${LISTFILE}
|
||||||
|
rm templist.txt
|
||||||
|
sed -i '/templist.txt/d' ${LISTFILE}
|
||||||
|
sed -i '/buildlist.sh/d' ${LISTFILE}
|
||||||
|
|
||||||
|
if [ -f ${CHECKFILE} ]; then
|
||||||
|
rm -f ${CHECKFILE}
|
||||||
|
fi
|
||||||
|
find ${1} -exec md5sum {} \; >> ${CHECKFILE}
|
||||||
|
|
||||||
|
echo "Done!"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue