My personal installation script to automate any new macOS system setup so I don't need to feel poor.
- A dogmatic script to set up my mac. Built for Mac OS X 🔥 🔥
- The minimum storage space and runtime are only estimates; they may vary from machine to machine.
⚠️ Still on experimental stage hence run at your own risk.⚠️
⚠️ Scripts in this project performs automated tasks. Review the code first and use at your own risk!⚠️
The script creates a centrally managed
dotfiles
directory on the~
of the file system.
To setup simply open the terminal, then:
$ bash -c "`curl -L https://git.io/dotfiles-m1`"
# after initial setup
$ cd dotfiles && ./setup.sh
- Make sure to lint the files prior to committing it.
💡 We make use of
shellcheck
andshfmt
to lint the shell scripts,
Install the linters,
brew install shellcheck
brew install shfmt
Lint the files before making a PR,
shellcheck <file>.sh
shfmt -l -w -s <file>.sh # style linting
When setting up a new Mac, you may want to set some sensible macOS defaults:
./macos/.macos
- Follow this gist to setup gpgkey with keybase.io.
npm rebuild node-sass
asdf plugin add ant
asdf list-all ant
asdf install ant latest
asdf global ant latest
ant -version
💡 Install an older NDK version
(20.*.* or lower)
from android studio.
Installing an older NDK version (20.*.* or lower)
will prevent the following flutter and react-native build errors,
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at [https://help.gradle.org](https://help.gradle.org)
BUILD FAILED in 1m 4s
Exception: Gradle task assembleDebug failed with exit code 1
$ sudo xcode-select --print-path
# if it something like /Library/Developer/..
$ sudo xcode-select --switch /Applications/Xcode.app
# install and link (to install native dependencies)
$ asdf local nodejs 14.18.1
$ npm i
$ react-native link
# create a .dev.env file inside
$ npm run setupEnv
$ npm run start # start the metro bundler
$ npm run android:qa
Known issues;
- https://github.com/facebook/react-native/pull/32486/files
- https://github.com/facebook/react-native/tree/0.68-stable
# clean previous installs of ffi and cocoapods
$ gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall
$ sudo gem uninstall ffi
$ rm -rf ~/.cocoapods/
# install ffi and cocoapods
$ sudo arch -x86_64 gem install ffi
$ sudo arch -x86_64 gem install cocoapods
# pod install inside the react-native project folder
$ cd react-native-owner-app/ios
$ pod install
cleanpod # will clean install pods
When your current working directory is a Git repository, the prompt will display the checked-out branch's name (and failing that, the commit SHA that HEAD is pointing to). The state of the working tree is reflected in the following way:
Symbol | Description |
---|---|
+ | Uncommitted changes in the index |
! | Unstaged changes |
? | Untracked files |
$ | Stashed files |
Further details are in the .zsh_prompt
file.
- Creating a custom git hook
- Auto-format shell files using
brew install shellcheck && brew install shfmt && shfmt -l -w script.sh
- Check precommit hook for linting
- Dynamically add inputs to the buffer and check the initialize script
- Run react-native setup as separate workflow.
- Check on
dotfilesdir="$HOME/${PWD##*/}"
and see if it really works on all files.
MIT © 2021-2023 Murshid Azher.