-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated scripts for new installer, bugfixes
- Loading branch information
Showing
7 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,4 +327,4 @@ function demo($item) { | |
return call_user_func("_{$item[1]}", array_merge($defs,$attr)); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Welcome to the new PHPL Installer! | ||
|
||
This installer will install or upgrade PHPL including modules and themes. If there are local changes to any of the themes, they should not be overwritten. It is still recommended that you copy the theme file when editing, and then edit the copy. | ||
|
||
You will be prompted to configure your shell automatically. Currently bash and fish can be configured. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
function _updateprompt { | ||
export LAST=$? | ||
export BASH_CWD="$(pwd)" | ||
export PS1="$(phpl-generate -s $LAST -d $BASH_CWD) " | ||
} | ||
|
||
export PROMPT_COMMAND="_updateprompt" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
OPERATION="$1" | ||
DESTINATION="$2" | ||
|
||
case "$1" in | ||
"install") | ||
echo "Copying powerline.sh to $DESTINATION" | ||
test -e "${DESTINATION}/powerline.sh" || cp "powerline.bash" "${DESTINATION}/powerline.sh" | ||
# Install into ~/.bashrc if not present | ||
grep "powerline.sh" ~/.bashrc &>/dev/null | ||
if [ $? != 0 ]; then | ||
echo "source ${DESTINATION}/powerline.sh" >> ~/.bashrc | ||
echo "Added phpl to .bashrc" | ||
else | ||
echo "phpl appears to already be added to your .bashrc" | ||
fi | ||
;; | ||
*) | ||
# Do nothing for anything else for now, uninstalling | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
OPERATION="$1" | ||
DESTINATION="$2" | ||
|
||
_FISH_FUNCS="${HOME}/.config/fish/functions" | ||
_FISH_PROMPT="${_FISH_FUNCS}/fish_prompt.fish" | ||
_TEMPLATE="./powerline.fish" | ||
|
||
case "$1" in | ||
"install") | ||
if [ -f "${_FISH_PROMPT}" ]; then | ||
mv "${_FISH_PROMPT}" "${_FISH_PROMPT}.old" | ||
fi | ||
echo "Installing into ${_FISH_PROMPT}" | ||
cp "${_TEMPLATE}" "${_FISH_PROMPT}" | ||
;; | ||
"uninstall") | ||
echo "Removing ${_FISH_PROMPT}" | ||
if [ -f "${_FISH_PROMPT}" ]; then | ||
mv "${_FISH_PROMPT}" "~/fish_prompt.old" | ||
fi | ||
;; | ||
esac | ||
|