Commit graph

38 commits

Author SHA1 Message Date
G Derber
f7761fd635
Add ability to differentiate group ownership from user ownership. 2024-08-06 09:38:25 -04:00
cmitu
e27de1e4a2 initfuncs: change sed separator for iniGet
Use `#` instead of `/` for SED's substitution command separator.

This makes the `iniGet` command work for key values containing `/` (like Dolphin's input configuration files). The `#` character is usually reserved for comment lines in an `.ini` file, so it should be relatively safe to use as separator; `sed` accepts any character besides `*` or newline for separator, so `#` should also be safe here.
2024-02-21 04:53:15 +00:00
Jools Wills
3562926730
Merge pull request #3349 from Gemba/fb_iniset_basic_re_grep
inifuncs.sh: using basic RE to allow meta-chars in keys , eg. +()
2023-03-24 09:25:20 +00:00
s1eve-mcdichae1
509c2fdc3f
Fix typo in comment. 2022-02-12 20:59:01 -08:00
Gemba
4ccd4b2be4 using basic RE to allow meta-chars in keys , eg. +() 2021-06-06 15:39:03 +02:00
Jools Wills
f00ddc772f inifuncs - quote [ and ] for sed - fixes removal of mupen64plus emulator.cfg entries that contain them 2020-07-30 03:57:58 +01:00
Jools Wills
47035624de fixed: make sure autoconf.cfg is owned by $user when adding/changing values 2019-06-22 03:04:00 +01:00
Jools Wills
04c4438848 more consistent sed parameters (just drop the -e) 2017-05-04 20:10:57 +01:00
Jools Wills
fe6beed9df we should follow symlinks when editing files with sed 2017-05-04 20:05:32 +01:00
meleu
f478b30308 iniProcess returns 0 if not editing retroarch.cfg
The test `[[ "$file" =~ retroarch\.cfg$ ]]` in the end of iniProcess was making the function always return a non-zero (fail) when not editing a retroarch.cfg file, even if everything was fine in iniProcess.

This change makes iniProcess return zero after that test.
2017-04-19 12:56:02 -03:00
Jools Wills
5a7014834c inifuncs - case with iniGet where there might be whitespace at the end of a line 2016-11-13 21:37:28 +00:00
Jools Wills
06ba17b420 inifuncs / iniGet - don't include \r (CR) in extracted value 2016-11-13 19:03:26 +00:00
Jools Wills
fdd4e3fa00 fatalError - use echo -e 2016-10-09 05:50:40 +01:00
Jools Wills
538e6000e8 inifuncs - added doxygen documentation 2016-10-01 23:04:09 +01:00
Jools Wills
72c7631996 inifuncs.sh - only edit/move the #include line from retroarch.cfg files if it is not at the end, which avoids re-saving the file every time 2016-08-27 12:21:02 +01:00
Jools Wills
15a6044227 cosmetic - missing newlines at end of files 2016-08-27 12:06:37 +01:00
Jools Wills
bda0ac6161 inifuncs.sh - make sure there is a newline in ini file when adding key/value pairs (in case the ini file has been manually edited and has an incomplete line on the end) 2016-08-26 20:50:57 +01:00
Jools Wills
e09467270b inifuncs - when moving retroarch include to the end always make sure there is a newline 2016-08-22 23:41:24 +01:00
Jools Wills
266d73e904 runcommand - fix path for retroarchIncludeToEnd. fixes #1636 2016-08-14 23:38:25 +01:00
Jools Wills
aedbc8e8b2 de-duplicate include moving in inifuncs/runcommand 2016-08-14 01:54:09 +01:00
Jools Wills
7d806d52e9 retroarch #include moving changes 2016-08-13 19:05:10 +01:00
Jools Wills
e385457a7b cosmetic - remove trailing spaces in copyright 2016-08-11 03:23:30 +01:00
Jools Wills
88a42752a2 inifuncs - make iniGet return last occurrence of a value in the case there are duplicate keys 2016-08-01 17:21:34 +01:00
Jools Wills
16c3b0a158 configedit - handle #include at end in the iniProcess function so it is available anywhere 2016-07-28 11:58:51 +01:00
Jools Wills
f528eecd9c iniFuncs - we need to handle cases where no quote is sent to iniConfig 2016-07-19 03:19:25 +01:00
Jools Wills
4c5d451e1d iniFuncs iniGet changes -
* fix an issue where an empty "" could result in a space as a result
 * simplify RE and allow it to handle tabs

Tested with configedit and a few others whilst manually trying to break the ini format - seems to handle it - hopefully no bugs
2016-07-19 03:03:02 +01:00
Jools Wills
19351be659 inifuncs - fix typo 2016-07-19 01:59:01 +01:00
Jools Wills
7c7ac3b493 allow iniGet to work when a vaue is unquoted (despite the quote being set in iniConfig) 2016-07-19 01:16:12 +01:00
Jools Wills
e9c5357948 standardise some of our ini file format / delimiter (will still read old values - and is less fussy this way) 2016-07-19 01:03:49 +01:00
Jools Wills
45ebec12ee 8bitdo mapping improvements
* add autoconf.cfg parameter 8bitdo_hack (default 1) to decide whether to add the offset to the inputs for retroarch - which is required on the older firmware
 * make sure autoconf.cfg is owned by $user - it would be created as root previously
 * add setAutoConf function
 * cleanup retroarch config generation code
2016-07-16 16:42:26 +01:00
Jools Wills
d68f880c3d reverse return code of getAutoConf 2016-07-16 15:49:31 +01:00
Jools Wills
5472708231 re-add comment 2016-06-01 17:09:58 +01:00
Jools Wills
b8c4c9f42b iniSet escape fixes
* add function for escaping strings
 * only escape for sed, and make sure we escape both the search and replace strings
 * fixes #1500
2016-06-01 17:08:20 +01:00
Jools Wills
d988d58e0a splashscreen - use extensions from splashscreen module in init.d script. add additional escaping of backslashes and pipes for sed in iniSet. 2016-05-14 18:44:04 +01:00
Kristian Sloth Lauszus
616bd00f08 Added missing quotes around file variable
This affected scriptmodules/emulators/mupen64plus/mupen64plus.sh in case the retroarch configuration file has spaces in the file name
2016-03-23 00:13:32 +01:00
gizmo98
70ee277e61 Add Opt Out autoconf functionality
-use /configs/all/autoconf.cfg to enable/disable autoconf functionality.
-add two new functions to add set read config file content.
-add functions to mupen64plus and reicast modules.
2015-12-07 17:37:24 +00:00
Jools Wills
a3df554f85 remove echo in iniSet as it interferes with calls from dialogs etc and is overly verbose for some configurations 2015-11-26 02:37:03 +00:00
Jools Wills
a9da023314 unify the various copies of the ini processing functions, installing them to $rootdir/lib/inifuncs.sh for use by inputconfiguration.sh / runcommand.sh / mupen64plus hotkey scripts. 2015-11-26 00:01:36 +00:00