Skip to content

Commit

Permalink
Fixed documentation and reduced hardcoding of upstream repo-owner's n…
Browse files Browse the repository at this point in the history
…ame.
  • Loading branch information
vraravam committed Jan 1, 2025
1 parent dd50eb5 commit 271031f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ As documented in the README's [adopting](README.md#how-to-adoptcustomize-the-scr

For those who follow this repo, here's the changelog for ease of adoption:

### 1.0-40

* Fixed documentation and reduced hardcoding of upstream repo-owner's name.

### 1.0-39

* Introduced [a new script](scripts/cleanup-browser-profiles.sh) to cleanup browser profiles folders.
Expand Down
2 changes: 1 addition & 1 deletion Extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The config file for this script is a yaml file that is passed into this script a

```yaml
- folder: "${PROJECTS_BASE_DIR}/oss/git_scripts"
remote: https://github.com/vraravam/git_scripts.git
remote: https://github.com/vraravam/git_scripts
other_remotes:
upstream1: <upstream remote url1>
upstream2: <upstream remote url2>
Expand Down
2 changes: 1 addition & 1 deletion GettingStarted-Advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ This portion of the script will setup the home folder repo, the browser profiles
* Setup the preferences and keyboard shortcuts as per your preferences. (I have setup for Clipboard history, Window management and Import/Export of the Raycast settings.)
*Hint:* If you had exported the configs into a file and had captured it as part of your home git repo, then simply re-importing will be sufficient on the new machine.

Back to the [readme](README.md#advanced-setup-in-addition-to-the-basic-setup-if-you-want-to-capture-other-files-in-an-encrypted-private-git-repo)
Back to the [readme](README.md#basic-setup)
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [How to test changes in your fork before raising a Pull Request](#how-to-test-changes-in-your-fork-before-raising-a-pull-request)
- [Pre-requisites](#pre-requisites)
- [Basic setup](#basic-setup)
- [Advanced setup (in addition to the basic setup if you want to capture other files in an encrypted private git repo)](#advanced-setup-in-addition-to-the-basic-setup-if-you-want-to-capture-other-files-in-an-encrypted-private-git-repo)
- [Finally...](#finally)
- [Ongoing tasks to keep your backup up-to-date on a regular basis](#ongoing-tasks-to-keep-your-backup-up-to-date-on-a-regular-basis)
- [Extras/Details](#extrasdetails)
Expand All @@ -26,7 +25,7 @@ If you want to be able to re-image a new machine with your own settings (and ove

In your forked repo, make the following changes, commit and push *via the Github web-UI itself* (for the first time before running the scripts). Once the above steps are done, and committed into your fork, then everytime you need to run the setup, you can run the `curl` commands that point to *your* fork:

1. **_Only in this file, `GettingStarted-Basic.md` and `files/--HOME--/.shellrc` files (and nowhere else):_** Find and replace the strings that reference my usernames to your equivalent ones (for eg, you can search for `vraravam` and `avijayr` and replace them with your values).
1. **_Only in this file, `GettingStarted-Basic.md` and `files/--HOME--/.shellrc` files (and nowhere else):_** Find and replace the strings that reference my usernames to your equivalent ones (for eg, you can search for `vraravam` (the `GH_USERNAME` env var) and `avijayr` (the `KEYBASE_USERNAME` env var) and replace them with your values).
2. ***Optional:*** The nested folder names that you choose for your setup (as referred to by `PROJECTS_BASE_DIR`, `PERSONAL_CONFIGS_DIR`, `PERSONAL_PROFILES_DIR`, `PERSONAL_BIN_DIR`, and `DOTFILES_DIR` in the `files/--HOME--/.shellrc` file) **should be reflected** in the folder structure of the nested folders in the `files` directory of the committed github repo itself. For eg, I have `PROJECTS_BASE_DIR="${HOME}/dev"`, and if your setup uses `workspace` instead of `dev`, then, in your forked repository, the folder name `files/dev` should be renamed to `files/workspace` and so on.
3. Review all entries in the `${HOME}/Brewfile`, and ensure that there are no unwanted libraries/applications. If you have any doubts (if comparing with my [Brewfile](files/--HOME--/Brewfile)), you will need to search the internet for the uses of those libraries/applications and decide whether to keep it or not.

Expand Down
7 changes: 4 additions & 3 deletions scripts/approve-fingerprint-sudo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
# Copied from: https://apple.stackexchange.com/a/466029

type is_file &> /dev/null 2>&1 || source "${HOME}/.shellrc"
type warn &> /dev/null 2>&1 || source "${HOME}/.shellrc"

if ! ioreg -c AppleBiometricSensor | grep -q "AppleBiometricSensor"; then
warn "Touch ID hardware is not detected. Skipping configuration."
if ! ioreg -c AppleBiometricSensor | grep -q AppleBiometricSensor; then
warn 'Touch ID hardware is not detected. Skipping configuration.'
return
fi

if ! is_file /etc/pam.d/sudo_local; then
sudo sh -c 'sed "s/^#auth/auth/" /etc/pam.d/sudo_local.template > /etc/pam.d/sudo_local'
success "Created new file: /etc/pam.d/sudo_local"
success 'Created new file: /etc/pam.d/sudo_local'
else
warn "'/etc/pam.d/sudo_local' already present - not creating again"
fi
6 changes: 3 additions & 3 deletions scripts/fresh-install-of-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ if is_non_zero_string "${DOTFILES_DIR}" && ! is_git_repo "${DOTFILES_DIR}"; then
# Setup any sudo access password from cmd-line to also invoke the gui touchId prompt
approve-fingerprint-sudo.sh

# Setup the DOTFILES_DIR repo's upstream if it doesn't already point to vraravam's repo
# Setup the DOTFILES_DIR repo's upstream if it doesn't already point to UPSTREAM_GH_USERNAME's repo
git -C "${DOTFILES_DIR}" remote -vv | grep "${UPSTREAM_GH_USERNAME}"
if [ $? -ne 0 ]; then
git -C "${DOTFILES_DIR}" remote add upstream "https://github.com/${UPSTREAM_GH_USERNAME}/dotfiles"
Expand All @@ -219,7 +219,7 @@ if is_non_zero_string "${DOTFILES_DIR}" && ! is_git_repo "${DOTFILES_DIR}"; then
warn 'skipping setting new upstream remote for the dotfiles repo'
fi
else
warn "skipping cloning the dotfiles repo since '${DOTFILES_DIR}' is either not defined or is already present"
warn "skipping cloning the dotfiles repo since '${DOTFILES_DIR}' is either not defined or is already a git repo"
fi

! is_non_zero_string "${HOMEBREW_PREFIX}" && error "'HOMEBREW_PREFIX' env var is not set; something is wrong. Please correct before retrying!"
Expand Down Expand Up @@ -360,7 +360,7 @@ if is_non_zero_string "${KEYBASE_USERNAME}"; then
clone_repo_into "$(build_keybase_repo_url "${KEYBASE_PROFILES_REPO_NAME}")" "${PERSONAL_PROFILES_DIR}"

# Clone the natsumi-browser repo into the ZenProfile/Profiles/chrome folder and switch to the 'dev' branch
is_directory "${PERSONAL_PROFILES_DIR}/ZenProfile/Profiles/" && clone_repo_into "[email protected]:vraravam/natsumi-browser" "${PERSONAL_PROFILES_DIR}/ZenProfile/Profiles/chrome" dev
is_directory "${PERSONAL_PROFILES_DIR}/ZenProfile/Profiles/" && clone_repo_into "[email protected]:${UPSTREAM_GH_USERNAME}/natsumi-browser" "${PERSONAL_PROFILES_DIR}/ZenProfile/Profiles/chrome" dev
else
warn "skipping cloning of profiles repo since either the 'KEYBASE_PROFILES_REPO_NAME' or the 'PERSONAL_PROFILES_DIR' env var hasn't been set"
fi
Expand Down

0 comments on commit 271031f

Please sign in to comment.