Compare commits
2 commits
3b7e6434b9
...
ef0a2367eb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef0a2367eb | ||
|
|
aaf6a52da4 |
3 changed files with 10 additions and 6 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
use Modern::Perl;
|
use Modern::Perl;
|
||||||
|
|
||||||
|
use FindBin qw($Bin);
|
||||||
|
use lib "$Bin/lib";
|
||||||
use ProcessDirectories;
|
use ProcessDirectories;
|
||||||
|
|
||||||
# Script to archive the financial data from the previous year
|
# Script to archive the financial data from the previous year
|
||||||
|
|
@ -22,14 +25,14 @@ my $financial_archive_folder = '/home/tracey/Documents/financial/1_financial_arc
|
||||||
my $lastyear_folder = $financial_archive_folder . $lastyear . '_FinancialArchives';
|
my $lastyear_folder = $financial_archive_folder . $lastyear . '_FinancialArchives';
|
||||||
|
|
||||||
|
|
||||||
create_archive_dirs ( $financial_folder, $lastyear_folder );
|
ProcessDirectories::create_archive_dirs ( $financial_folder, $lastyear_folder );
|
||||||
|
|
||||||
# Make sure contents match before we do any deleting
|
# Make sure contents match before we do any deleting
|
||||||
# croak on errors to guard against data loss
|
# croak on errors to guard against data loss
|
||||||
# my $same_result = compare_dirs( $financial_folder, $lastyear_folder );
|
# my $same_result = compare_dirs( $financial_folder, $lastyear_folder );
|
||||||
croak "Error: The source and destintion folder contents are not the same!" unless ( compare_dirs( $financial_folder, $lastyear_folder ) );
|
croak "Error: The source and destintion folder contents are not the same!" unless ( ProcessDirectories::compare_dirs( $financial_folder, $lastyear_folder ) );
|
||||||
|
|
||||||
# Delete all files from current year from archive folders
|
# Delete all files from current year from archive folders
|
||||||
# Also delete files from last year in current year folder
|
# Also delete files from last year in current year folder
|
||||||
clean_dirs( $financial_folder, $lastyear_folder, $year, $lastyear );
|
ProcessDirectories::clean_dirs( $financial_folder, $lastyear_folder, $year, $lastyear );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
use Modern::Perl;
|
use Modern::Perl;
|
||||||
|
|
||||||
use Time::Piece;
|
use Time::Piece;
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@
|
||||||
function update_repos() {
|
function update_repos() {
|
||||||
printf "[INFO] Updating the Solus package repo\n"
|
printf "[INFO] Updating the Solus package repo\n"
|
||||||
gotosoluspkgs
|
gotosoluspkgs
|
||||||
|
git stash
|
||||||
git switch main
|
git switch main
|
||||||
git fetch && git pull
|
git fetch && git pull
|
||||||
|
|
||||||
printf "[INFO] Updating the Solus infrastructure-tooling repo \n"
|
printf "[INFO] Updating the Solus infrastructure-tooling repo \n"
|
||||||
cd infrastructure-tooling
|
cd ../infrastructure-tooling
|
||||||
git switch master
|
git switch master
|
||||||
git fetch && git pull
|
git fetch && git pull
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue