Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
geocat-ancillary
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geocat
geocat-ancillary
Commits
3d000595
Commit
3d000595
authored
3 years ago
by
Justin Sieglaff
Browse files
Options
Downloads
Patches
Plain Diff
Script for comparing two copies of ancil
parent
f86e73a2
Branches
jan2021_sync
Branches containing commit
Tags
r20210712-volcat-code-ancil
r20210714-volcat-code-ancil
r20210811-volcat-code-ancil
r20211012-volcat-code-ancil
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/compare_two_copies.bash
+53
-0
53 additions, 0 deletions
scripts/compare_two_copies.bash
with
53 additions
and
0 deletions
scripts/compare_two_copies.bash
0 → 100755
+
53
−
0
View file @
3d000595
#! /bin/bash
source
~/.bash_profile
golden_path
=
/data/common/GEOCAT_ANCILLARY_DATA/navigation/
subdir
=
$(
basename
$golden_path
)
test_path
=
/data/justins/gancil/geocat-ancillary/data/
${
subdir
}
/
ls
-1
$golden_path
>
$(
pwd
)
/golden_list_
${
subdir
}
.txt
ls
-1
$test_path
>
$(
pwd
)
/test_list_
${
subdir
}
.txt
outfile
=
$(
pwd
)
/
${
subdir
}
_comparison_report.txt
rm
-f
${
outfile
}
while
read
line
do
grep
-i
$line
$(
pwd
)
/test_list_
${
subdir
}
.txt
if
[
$?
-ne
0
]
then
echo
"
$line
| exists in golden but not test"
>>
${
outfile
}
fi
done
<
$(
pwd
)
/golden_list_
${
subdir
}
.txt
echo
"############################"
>>
$outfile
while
read
line
do
grep
-i
$line
$(
pwd
)
/golden_list_
${
subdir
}
.txt
if
[
$?
-ne
0
]
then
echo
"
$line
| exists in test but not golden"
>>
${
outfile
}
fi
done
<
$(
pwd
)
/test_list_
${
subdir
}
.txt
echo
"############################"
>>
$outfile
while
read
line
do
grep
-i
$line
$(
pwd
)
/test_list_
${
subdir
}
.txt
if
[
$?
-eq
0
]
then
diff
${
golden_path
}
/
$line
${
test_path
}
/
$line
>
/dev/null 2>&1
if
[
$?
-ne
0
]
then
echo
"
${
line
}
| files did not match."
>>
${
outfile
}
fi
fi
done
<
$(
pwd
)
/golden_list_
${
subdir
}
.txt
exit
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment