made tpm integration and patching more robust, fixes #540
This commit is contained in:
parent
96d085eaa7
commit
05d73a54ed
23
.tmux.conf
23
.tmux.conf
|
@ -1371,26 +1371,31 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
||||||
# elif { [ -z "$window_active" ] && _is_enabled "$tmux_conf_update_plugins_on_launch"; } || { [ -n "$window_active" ] && _is_enabled "$tmux_conf_update_plugins_on_reload"; }; then
|
# elif { [ -z "$window_active" ] && _is_enabled "$tmux_conf_update_plugins_on_launch"; } || { [ -n "$window_active" ] && _is_enabled "$tmux_conf_update_plugins_on_reload"; }; then
|
||||||
# update_tpm=true
|
# update_tpm=true
|
||||||
# tmux display 'Updating tpm and plugins...'
|
# tmux display 'Updating tpm and plugins...'
|
||||||
# (cd "$TMUX_PLUGIN_MANAGER_PATH/tpm" && git checkout -q master && git reset -q --hard HEAD && git pull -q origin master)
|
# (cd "$TMUX_PLUGIN_MANAGER_PATH/tpm" && git fetch -q -p && git checkout -q master && git reset -q --hard origin/master)
|
||||||
# fi
|
# fi
|
||||||
# if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then
|
# if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then
|
||||||
# perl -0777 -p -i -e 's/git clone/git clone --depth 1/g
|
# perl -0777 -p -i -e 's/git clone(?!\s+--depth\s+1)/git clone --depth 1/g
|
||||||
# ;s/(install_plugin "\$plugin")\n(\s+)done/\1&\n\2done\n\2wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh"&
|
# ;s/(install_plugin(.(?!&))*)\n(\s+)done/\1&\n\3done\n\3wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh"
|
||||||
# perl -p -i -e 's/git submodule update --init --recursive/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh"&
|
# perl -p -i -e 's/git submodule update --init --recursive(?!\s+--depth\s+1)/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh"
|
||||||
# perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh"&
|
# perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh"
|
||||||
# wait
|
|
||||||
# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
|
# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
|
||||||
# fi
|
# fi
|
||||||
# if [ x"$update_tpm" = x"true" ]; then
|
# if [ x"$update_tpm" = x"true" ]; then
|
||||||
# {
|
# {
|
||||||
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \
|
||||||
|
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
||||||
|
# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \
|
||||||
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
||||||
|
# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \
|
||||||
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\
|
||||||
# tmux display 'Done updating tpm and plugins...'
|
# tmux display 'Done updating tpm and plugins...'
|
||||||
# } || tmux display 'Failed updating tpm and plugins...'
|
# } || tmux display 'Failed updating tpm and plugins...'
|
||||||
# elif [ x"$install_tpm" = x"true" ]; then
|
# elif [ x"$install_tpm" = x"true" ]; then
|
||||||
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1
|
# {
|
||||||
# tmux display 'Done installing tpm and plugins...'
|
# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \
|
||||||
|
# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1
|
||||||
|
# tmux display 'Done installing tpm and plugins...'
|
||||||
|
# } || tmux display 'Failed installing tpm and plugins...'
|
||||||
# fi
|
# fi
|
||||||
# else
|
# else
|
||||||
# tmux display "GitHub doesn't seem to be reachable, skipping installing and/or updating tpm and plugins..."
|
# tmux display "GitHub doesn't seem to be reachable, skipping installing and/or updating tpm and plugins..."
|
||||||
|
|
Loading…
Reference in New Issue