Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
27770e1e
Commit
27770e1e
authored
Jul 01, 2013
by
Dubiousjim
Committed by
Natanael Copa
Jul 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-conf: add vimdiff action
parent
63198c22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
update-conf.in
update-conf.in
+10
-1
No files found.
update-conf.in
View file @
27770e1e
...
...
@@ -51,6 +51,11 @@ while true; do
shift
done
if
which vimdiff
>
/dev/null
;
then
vflag
=
", Vimdiff old new"
vflag2
=
"/v"
fi
for
apknew
in
$(
find
"
$ROOT
/etc"
-name
'*.apk-new'
)
;
do
p
=
"
${
apknew
%.apk-new
}
"
f
=
"
${
p
#
${
ROOT
}
/
}
"
...
...
@@ -75,7 +80,7 @@ for apknew in $(find "$ROOT/etc" -name '*.apk-new') ; do
# ask user what to do with the file
while
[
-z
"
$choice
"
]
;
do
echo
"New
$p
available:"
echon
"Quit, Next, Show diff, Edit new
, Zap new, Use new (q/n/s/e
/z/u) [s]: "
echon
"Quit, Next, Show diff, Edit new
${
vflag
}
, Zap new, Use new (q/n/s/e
${
vflag2
}
/z/u) [s]: "
default_read choice
"s"
</dev/tty
case
"
$choice
"
in
q
)
exit
;;
...
...
@@ -84,6 +89,10 @@ for apknew in $(find "$ROOT/etc" -name '*.apk-new') ; do
unset
choice
;;
e
)
${
EDITOR
:-
vi
}
"
$apknew
"
;
unset
choice
;;
v
)
if
[
"
$vflag
"
]
;
then
vimdiff
"
$p
"
"
$apknew
"
fi
unset
choice
;;
z
)
rm
"
$apknew
"
;;
u
)
mv
"
$apknew
"
"
$p
"
;;
*
)
unset
choice
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment