-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit the 'loggedInUserFirstname' variable to 25 characters and capitalize its first letter #20
Comments
Thanks for the ongoing testing and FRs, @mani2care. While this strikes me as a "garbage in, garbage out" situation — if users are too lazy to capitalize their own names, why should we reward their bad behavior — please test the following:
|
loggedInUserFirstname
hi Dan, Tested with this loggedInUserFirstname its works well. However, if the account name is very long then 15, its another scenario. for example can be possible like this if the name is very longer just to limiting the letters 10
Manikandan...... so this will be limited printing the letters after if any words will be printed like ...... Before : After : |
loggedInUserFirstname
Thanks for the additional details and example strings. Please test the following:
|
@mani2care: The example above is for the first |
I think this is looks good shot and sweet ,& prefer the first 10 characters
Find the test results: |
- 🔥 **Breaking Change** for users of Setup Your Mac prior to `1.10.0` 🔥 - Added `recon` validation, which **must** be used when specifiying the `recon` trigger (Addresses [Issue No. 19](#19)) - Standardized formatting of `toggleJamfLaunchDaemon` function - Limit the 'loggedInUserFirstname' variable to 10 characters and capitalize its first letter (Addresses [Issue No. 20](#20); thanks @mani2care!)
@mani2care: This should be addressed in |
- Limit the 'loggedInUserFirstname' variable to 25 characters and capitalize its first letter (Addresses [Issue No. 20](#20); thanks @mani2care!) - Added line break to 'welcomeTitle' and 'welcomeBannerText' - Replaced some generic "Mac" instances with hardware-specific model name (thanks, @Pico!)
@mani2care: Please test-drive As mentioned in the #setup-your-mac Channel on the Mac Admins Slack:
|
(You can uncomment Line No. 216 during testing.) |
Hi @dan-snelson find the attached the test results. longname.test.movshortname.test.mov |
06-Apr-2023 - 🆕 **Configuration Download Estimate** (Addresses [Issue No. 7]((#7)); thanks for the idea, @DevliegereM; heavy-lifting provided by @bartreardon!) - Manually set `configurationDownloadEstimation` within the script to `true` to enable - Specify an arbitrary value for `correctionCoefficient` (i.e., a "fudge factor" to help estimates match reality) - Calculate total file size (in MB) for each Configuration, then populate: - `configurationOneSize` - `configurationTwoSize` - `configurationThreeSize` - 🔥 **Breaking Change** for users of Setup Your Mac prior to `1.10.0` 🔥 - Added `recon` validation, which **must** be used when specifying the `recon` trigger (Addresses [Issue No. 19](#19)) - Standardized formatting of `toggleJamfLaunchDaemon` function - Limit the `loggedInUserFirstname` variable to `25` characters and capitalize its first letter (Addresses [Issue No. 20](#20); thanks @mani2care!) - Added line break to `welcomeTitle` and `welcomeBannerText` - Replaced some generic "Mac" instances with hardware-specific model name (thanks, @Pico!) - Replaced `verbose` Debug Mode code with `outputLineNumberInVerboseDebugMode` function (thanks, @bartreardon!) - Removed dependency on `dialogApp`
10-Apr-2023 - 🆕 **Configuration Download Estimate** (Addresses [Issue No. 7]((#7)); thanks for the idea, @DevliegereM; heavy-lifting provided by @bartreardon!) - Manually set `configurationDownloadEstimation` within the SYM script to `true` to enable - New `calculateFreeDiskSpace` function will record free space to `scriptLog` before and after SYM execution - Compare before and after free space values via: `grep "free" $scriptLog` - Populate the following variables, in Gibibits (i.e., Total File Size in Gigabytes * 7.451), for each Configuration: - `configurationOneSize` - `configurationTwoSize` - `configurationThreeSize` - Specify an arbitrary value for `correctionCoefficient` (i.e., a "fudge factor" to help estimates match reality) - Validate actual elapsed time with: `grep "Elapsed" $scriptLog` - 🔥 **Breaking Change** for users of Setup Your Mac prior to `1.10.0` 🔥 - Added `recon` validation, which **must** be used when specifying the `recon` trigger (Addresses [Issue No. 19](#19)) - Standardized formatting of `toggleJamfLaunchDaemon` function - Limit the `loggedInUserFirstname` variable to `25` characters and capitalize its first letter (Addresses [Issue No. 20](#20); thanks @mani2care!) - Added line break to `welcomeTitle` and `welcomeBannerText` - Replaced some generic "Mac" instances with hardware-specific model name (thanks, @Pico!) - Replaced `verbose` Debug Mode code with `outputLineNumberInVerboseDebugMode` function (thanks, @bartreardon!) - Removed dependency on `dialogApp` - Check `bannerImage` and `welcomeBannerImage` ([Pull Request No. 22](#22); thanks @amadotejada!)
…uplicates — is converted to a sorted, unique, JSON-compatible 'departmentList' variable (Addresses Issue No. 23; thanks @rougegoat) Signed-off-by: Dan K. Snelson <dan@snelson.us>
One more request change the headline to Center align so it’s looks good |
@mani2care: This one comes down to personal preference; I think the left-aligned header looks good. |
Thanks, @mani2care! |
Hi Dan,
Greetings for the better visibility and standardising the login user first letter to making it capitalising
from : https://github.com/dan-snelson/Setup-Your-Mac/blob/5c0c95887aa7cb82c7c20010b312710341395a9d/Setup-Your-Mac-via-Dialog.bash#L216
to :
loggedInUserFullname=$( id -F "${loggedInUser}" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)), $i)}1')
Find the attached out put before :
Find the out put after :
The text was updated successfully, but these errors were encountered: