mirror of
https://github.com/videolan/vlc.git
synced 2024-12-12 03:06:13 +08:00
cachegen: remove force option and always reset the cache when the helper tool is executed (refs #14519)
This commit is contained in:
parent
0c4006882d
commit
d71c794d5f
@ -42,8 +42,7 @@ static void usage (const char *path)
|
|||||||
{
|
{
|
||||||
printf (
|
printf (
|
||||||
"Usage: %s [-f] <path>\n"
|
"Usage: %s [-f] <path>\n"
|
||||||
"Generate the LibVLC plugins cache for the specified plugins directory.\n"
|
"Generate the LibVLC plugins cache for the specified plugins directory.\n",
|
||||||
" -f, --force forcefully reset the plugin cache (if it exists)\n",
|
|
||||||
path);
|
path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,21 +53,16 @@ int main (int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
static const struct option opts[] =
|
static const struct option opts[] =
|
||||||
{
|
{
|
||||||
{ "force", no_argument, NULL, 'f' },
|
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ "version", no_argument, NULL, 'V' },
|
{ "version", no_argument, NULL, 'V' },
|
||||||
{ NULL, no_argument, NULL, '\0'}
|
{ NULL, no_argument, NULL, '\0'}
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
bool force = false;
|
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "fhV", opts, NULL)) != -1)
|
while ((c = getopt_long (argc, argv, "fhV", opts, NULL)) != -1)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'f':
|
|
||||||
force = true;
|
|
||||||
break;
|
|
||||||
case 'h':
|
case 'h':
|
||||||
usage (argv[0]);
|
usage (argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
@ -91,8 +85,7 @@ int main (int argc, char *argv[])
|
|||||||
int vlc_argc = 0;
|
int vlc_argc = 0;
|
||||||
|
|
||||||
vlc_argv[vlc_argc++] = "--quiet";
|
vlc_argv[vlc_argc++] = "--quiet";
|
||||||
if (force)
|
vlc_argv[vlc_argc++] = "--reset-plugins-cache";
|
||||||
vlc_argv[vlc_argc++] = "--reset-plugins-cache";
|
|
||||||
vlc_argv[vlc_argc++] = "--"; /* end of options */
|
vlc_argv[vlc_argc++] = "--"; /* end of options */
|
||||||
vlc_argv[vlc_argc] = NULL;
|
vlc_argv[vlc_argc] = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user