Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Feb 25, 2024
1 parent 5cf3ab4 commit cdf1756
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion catfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
function PackCatFile {
shopt -s globstar
curinode=0
echo -n -e 'CatFile1\x00' > ${2}
numfiles=$(find "${1}" -mindepth 1 -print | wc -l)
echo -n -e 'CatFile1\x00${numfiles}\x00' > ${2}
for file in ${1}/**; do
fname="${file%/}"
echo "${fname}"
Expand Down Expand Up @@ -101,6 +102,8 @@ function PackCatFile {
echo -n -e '\x00' >> ${tmpfile}
echo -n "${fdev_major}" >> ${tmpfile}
echo -n -e '\x00' >> ${tmpfile}
echo -n "0" >> ${tmpfile}
echo -n -e '\x00' >> ${tmpfile}
if [ "${4}" == "none" ]; then
echo -n "${4}" >> ${tmpfile}
echo -n -e '\x00' >> ${tmpfile}
Expand Down

0 comments on commit cdf1756

Please sign in to comment.