You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**APP_NAME**|`APP`| The short name of the application. |
30
+
|**APP_DIR**|`.APP`| The installation directory name of the application. |
31
+
|**RELEASE_URL**|`https://example.com/...`| The direct download URL for the release archive (.tgz for Bash, .zip for Batch). |
32
32
33
33
### **2\. Overridable Variables**
34
34
35
35
These variables have defaults set within the script but can be overridden by placing them in one of the following configuration files (in order of precedence):
The format for the configuration files is simple KEY=VALUE, with comments starting with \#.
40
+
The format for the configuration files is simple `KEY=VALUE`, with comments starting with `#`.
41
41
42
-
| Variable | Default Value | Description |
43
-
|:------------------| :---- | :---- |
44
-
|**UPDATE_PERIOD**| 3 | The number of days after which an update check must be performed. If the last\_checked file is older than this period, the script will attempt to contact the server. |
|**UPDATE_PERIOD**| 3 | The number of days after which an update check must be performed. If the last\_checked file is older than this period, the script will attempt to contact the server. |
45
+
|**LOG_LEVEL**|\<empty> | Logging level. Default empty/silent; set to anything, e.g., 'DEBUG', to enable logging |
45
46
46
47
**Example bootstrap.cfg content:**
47
48
@@ -65,8 +66,8 @@ UPDATE_PERIOD=7
65
66
66
67
## **Usage**
67
68
68
-
1.**Configure:** Edit the `NAME` and `RELEASE_URL` variables (and possibly `APP_HOME` if you want a different name than the default) at the top of both scripts (`APPw` and `APPw.bat`).
69
-
2.**Rename & Place:** Rename the scripts to match your application's name. Common usage is to have the name of the scripts end in the letter “w” to indicate they are “wrapper” scripts (e.g., if NAME=foo, rename to foow andfoow.bat).
69
+
1.**Configure:** Edit the `NAME` and `RELEASE_URL` variables (and possibly `APP_DIR` if you want a different name than the default) at the top of both scripts (`APPw` and `APPw.bat`).
70
+
2.**Rename:** Rename the scripts to match your application's name. Common usage is to have the name of the scripts end in the letter “w” to indicate they are “wrapper” scripts (e.g., if `APP_NAME=foo`, rename to `foow` and`foow.bat`).
70
71
3.**Execute:** Place the scripts in a directory where you want the command to be available and run it:
71
72
72
73
```
@@ -77,4 +78,24 @@ UPDATE_PERIOD=7
77
78
.\foow.cmd /flag
78
79
```
79
80
80
-
The first time you run it, the application will download and install itself to the user’s home directory ($HOME/.foo). Subsequent runs will check for updates if the configured period has passed.
81
+
The first time you run it, the application will download and install itself to the user’s home directory (`$HOME/$APP_DIR`). Subsequent runs will check for updates if the configured period has passed.
82
+
83
+
### Force new version check
84
+
85
+
To force an update check, you can delete the `last_checked` file located in the application's installation directory, eg:
86
+
87
+
```
88
+
rm $HOME/.APP/cache/last_checked
89
+
```
90
+
91
+
Then the next execution of the script will check for updates.
92
+
93
+
### Force update/reinstall
94
+
95
+
To force a complete reinstallation of the application, delete the application's `cache` directory, eg:
96
+
97
+
```
98
+
rm -rf $HOME/.APP/cache
99
+
```
100
+
101
+
Then the next execution of the script will download and install the application afresh.
0 commit comments