Skip to content

Commit

Permalink
Fixed shells.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Apr 2, 2020
1 parent ee1a8f7 commit 2b16d46
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
58 changes: 29 additions & 29 deletions code.bundle

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions databases/branch_backup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh

tar -cvf $1 $2
tar --append --file $1 $3
tar --append --file $1 $4
2 changes: 2 additions & 0 deletions databases/branch_restore.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/sh

rm -r $2*
tar -xf $1 -C /
2 changes: 2 additions & 0 deletions databases/source_backup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/sh

tar -czvf $1 -C $2 .
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License
Copyright 2019 (c) Peter Širka <petersirka@gmail.com>
Copyright 2019-2020 (c) Peter Širka <petersirka@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
Expand Down
4 changes: 2 additions & 2 deletions schemas/branches.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NEWSCHEMA('Branches', function(schema) {
arg.push(project.path);
arg.push(PATH.databases(project.id + '_changes.nosql'));
arg.push(PATH.databases(project.id + '_parts.nosql'));
Exec(PATH.databases('branch_backup.sh'), arg, callback || NOOP);
Exec(PATH.databases('branch_backup.sh') + ' ' + arg.join(' '), { shell: '/bin/sh' }, callback || NOOP);
};

var restore = function(project, branch, callback) {
Expand Down Expand Up @@ -44,7 +44,7 @@ NEWSCHEMA('Branches', function(schema) {
var arg = [];
arg.push(filename);
arg.push(project.path);
Exec(PATH.databases('branch_restore.sh'), arg, callback || NOOP);
Exec(PATH.databases('branch_restore.sh') + ' ' + arg.join(' '), { shell: '/bin/sh' }, callback || NOOP);
});

});
Expand Down
2 changes: 1 addition & 1 deletion schemas/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ NEWSCHEMA('Files', function(schema) {
arg.push(PATH.temp(filename));
arg.push(project.path);

Exec(PATH.databases('source_backup.sh'), arg, function(err) {
Exec(PATH.databases('source_backup.sh') + ' ' + arg.join(' '), { shell: '/bin/sh' }, function(err) {
if (err) {
$.invalid(err);
} else {
Expand Down

0 comments on commit 2b16d46

Please sign in to comment.