new: delete scripts when delete server

This commit is contained in:
lollipopkit
2023-11-07 18:10:38 +08:00
parent e80f6d4cc2
commit 2133302397
17 changed files with 117 additions and 56 deletions

View File

@@ -16,8 +16,8 @@ enum ShellFunc {
suspend,
;
static const _serverBoxDir = '.config/server_box';
static const _scriptFileName = 'mobile_v${BuildData.script}.sh';
static const _srvBoxDir = '.config/server_box';
static const _scriptFile = 'mobile_v${BuildData.script}.sh';
/// Issue #159
///
@@ -26,15 +26,15 @@ enum ShellFunc {
/// So different version of app can run at the same time.
///
/// **Can't** use it in SFTP, because SFTP can't recognize `$HOME`
static String getShellPath(String home) =>
'$home/$_serverBoxDir/$_scriptFileName';
static String getShellPath(String home) => '$home/$_srvBoxDir/$_scriptFile';
static final _installShellPath = getShellPath(_homeVar);
static const srvBoxDir = '$_homeVar/$_srvBoxDir';
static const _installShellPath = '$_homeVar/$_srvBoxDir/$_scriptFile';
/// Issue #168
/// Use `sh` for compatibility
static final installShellCmd = """
mkdir -p $_homeVar/$_serverBoxDir
mkdir -p $_homeVar/$_srvBoxDir
cat << 'EOF' > $_installShellPath
${ShellFunc.allScript}
EOF

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 630;
static const int build = 634;
static const String engine = "3.13.8";
static const String buildAt = "2023-11-02 13:45:05";
static const int modifications = 1;
static const String buildAt = "2023-11-03 22:14:11";
static const int modifications = 2;
static const int script = 25;
}