Skip to content

Commit

Permalink
v1.0-BETA-6
Browse files Browse the repository at this point in the history
  • Loading branch information
dla-fritz committed May 8, 2021
1 parent a3eb176 commit bc2b55b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/friller/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BINARY=friller
VERSION=1.0.0-BETA-7
VERSION=1.0.0-BETA-6
SigFile=pronom:DROID_SignatureFile_V97.xml;container-signature-20201001.xml
BUILD=`git rev-parse --short HEAD`
PLATFORMS=darwin linux windows
Expand Down
8 changes: 4 additions & 4 deletions cmd/friller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ func main() {

flag.Parse()

// Create two loggers for two log files, standard and error
fdr.CreateLogger(*logFile)
fdr.CreateErrorLogger(*errlogFile)

if *vers {
log.Printf("Version: %s. Build: %s. Signature Version: %s", Version, Build, SigFile)
return
Expand Down Expand Up @@ -110,6 +106,10 @@ func main() {
return
}

// Create two loggers for two log files, standard and error
fdr.CreateLogger(*logFile)
fdr.CreateErrorLogger(*errlogFile)

if len(*rootDir) == 0 {
log.Println("error: -in is a mandatory flag")
return
Expand Down
17 changes: 15 additions & 2 deletions process.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ func IdentifyFiles(fileList []string, hashDigest string, nsrlEnabled bool, conn

var entroFile float64

bar := pb.StartNew(len(fileList))
showBar := true

if len(fileList) < 2 {
showBar = false
}

bar := pb.New(len(fileList))

if showBar {
bar.Start()
}

for _, filePath := range fileList {
successful, oneFileResult := siegfriedIdent(s, filePath)
Expand Down Expand Up @@ -84,7 +94,10 @@ func IdentifyFiles(fileList []string, hashDigest string, nsrlEnabled bool, conn
}

resultList = append(resultList, oneFile)
bar.Increment()

if showBar {
bar.Increment()
}
}

bar.Finish()
Expand Down
2 changes: 1 addition & 1 deletion siegfried.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func siegfriedIdent(s *siegfried.Siegfried, inFile string) (bool, string) {

fi, _ := f.Stat()
if fi.Size() == 0 {
return resultBool, "empty file : " + inFile + ",,,,,,,,"
return resultBool, "\"" + inFile + "\",,,,,,,,"
}

ids, err := s.Identify(f, "", "")
Expand Down

0 comments on commit bc2b55b

Please sign in to comment.