Comments (7)
The script should take care of everything but downloading the repo. That should be handled by the AUR package or the user. There should basically be an install.sh
that does everything for the user. THe following function are desirable:
- If the user has root privileges, put it somewhere on the system
- If the user has no root privileges, ask where to put the scripts. Use the current
pwd
as default - Copy the example config files to ~/.config/scripts
from synth-shell.
Some dirty notes
If installed by AUR or DEB:
/usr/bin is for distribution-managed normal user programs.
If installed manually:
/usr/local/bin is for normal user programs not managed by the distribution package manager, e.g. locally compiled packages. You should not install them into /usr/bin because future distribution upgrades may modify or delete them without warning.
teh path of where to install it shoudl be an external script parameter, set by default to /usr/local/bin, but which might be overriden by AUR or DEB.
The installer should also check whether the script already exists in any other folder (/usr/local/bin or /usr/bin) regardless of how it is installed, and remove it.
To apply to all bashrc: /etc/bash.bashrc
But add several and reduntant checks to see if scripts are in place and so on
Also, DO NOT apply to root account
When modifying /etc/bash.bashrc, make sure there is not an entry for the scripts already in place. Ideally, do not add everything, but source a script that takes care of all.
That way, only 1 line is added to /etc/bash.bashrc and its easier to check and modify in the future
from synth-shell.
@olmari Can you test the script? The instructions are on the README.md file
from synth-shell.
Working on this to remove recursivity
from synth-shell.
by @olmari, extracted from his own bash.basrc: method to handle problems with the script
# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
from synth-shell.
Added working installer and updated README to features/installer.
from synth-shell.
Installation works great. See latest push to branch features/installer
.
But, I still have the following problem:
-
I'm unable to control when the hook is appended to
/etc/bash.bashrc
. Ideally, it should check if the hook is already present in the file (something like a multi-linegrep
) and only append it if not -
Likewise, for the uninstaller, I really need to check if the hook is in
/etc/bash.bashrc
, and if so, delete it. Otherwise, the script will leave residues in the system.
In both cases, the hook is stored in the variable hook
. The script should do the automatic append/removal using the content of said variable.
from synth-shell.
Related Issues (20)
- wc error
- Synth-shell on Windows WSL HOT 2
- better-ls not listing subdirectory HOT 2
- How to limit the python environment length in the prompt?
- Prompt shows ".." instead of "~" for config dir HOT 1
- Glitched looking name system and directory blocks HOT 3
- prompt looks weird. HOT 5
- The cd command lists wrong information HOT 3
- uE0B0 Triangle Separator Char Border Bug HOT 2
- Unable to install. bash-tools: No such file or directory HOT 2
- Terminal no longer starts up in home directory HOT 2
- Additional built-in visual themes HOT 2
- bug in alias.sh and bashhrc HOT 2
- Greeter bug
- custom prompt only for root kali HOT 3
- Unwated 1px Line around WorkingDir HOT 2
- . HOT 1
- SYSTEMCTL FAILED SERVICES:
- Greeter, 'bc' not found. HOT 2
- the theme does not apply when Im in root HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synth-shell.