mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* select-screen-profile: don't mess with the user's ~/.screenrc file here;
only set up the ~/.screenrc-profile symlink
This commit is contained in:
parent
8150ef0a55
commit
836aae8ec0
1 changed files with 0 additions and 15 deletions
|
@ -115,21 +115,6 @@ setprofile() {
|
|||
for x in $profiles; do
|
||||
i=`expr $i + 1`
|
||||
if [ "$i" = "$selected" -o "$x" = "$selected" ]; then
|
||||
if [ ! -e "$HOME/.screenrc" ]; then
|
||||
# If the user doesn't have a .screenrc, seed one
|
||||
echo "source $HOME/.screenrc-profile" > "$HOME/.screenrc"
|
||||
else
|
||||
# If the user does have a .screenrc, see if it has the
|
||||
# sources lines
|
||||
if ! grep -qs "source $HOME/.screenrc-profile" "$HOME/.screenrc"; then
|
||||
# And if it's missing the source line, add it
|
||||
# to the top
|
||||
tmp=`mktemp "$HOME/.screenrc.XXXXXX"`
|
||||
echo "source $HOME/.screenrc-profile" > "$tmp"
|
||||
cat "$HOME/.screenrc" >> "$tmp"
|
||||
mv -f "$tmp" "$HOME/.screenrc"
|
||||
fi
|
||||
fi
|
||||
rm -f "$HOME/.screenrc-profile"
|
||||
ln -s "$PROFILE_DIR/$x" "$HOME/.screenrc-profile"
|
||||
found=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue