Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Esteban Blanc
proview
Commits
189506f7
Commit
189506f7
authored
Feb 17, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Command 'save file' added
parent
f467e2e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
src/exp/com/src/os_linux/pwrp_env.sh
src/exp/com/src/os_linux/pwrp_env.sh
+48
-0
No files found.
src/exp/com/src/os_linux/pwrp_env.sh
View file @
189506f7
...
...
@@ -1382,6 +1382,48 @@ pwrc_setdb_func()
pwrc_status
=
$pwrc__success
}
pwrc_save_func
()
{
local
cmd
local
pname
local
broot
if
[
-z
$1
]
;
then
echo
"Qualifier is missing"
pwrc_status
=
$pwrc__syntax
return
fi
if
[
$1
=
"file"
]
;
then
pwrc_save_file_func
$2
else
echo
"Unknown command"
fi
}
pwrc_save_file_func
()
{
new_file
=
$1
if
[
-e
$new_file
]
;
then
let
version
=
9
while
[
$version
-ge
1
]
do
old_file
=
$new_file
.
$version
old_file_ren
=
$new_file
.
$((
version+1
))
if
[
-e
$old_file
]
;
then
mv
$old_file
$old_file_ren
fi
let
version
=
$version
-1
done
old_file
=
$new_file
.1
echo
"-- Saving file
$new_file
->
$old_file
"
mv
$new_file
$old_file
fi
}
pwrc_help_func
()
{
cat
<<
EOF
...
...
@@ -1463,6 +1505,12 @@ pwrc_parse ()
pwrc_set_func
$@
return
$pwrc_status
fi
cmd
=
"save"
if
[
$1
=
$cmd
]
||
[
${
cmd
#
$1
}
!=
$cmd
]
;
then
shift
pwrc_save_func
$@
return
$pwrc_status
fi
cmd
=
"setdb"
if
[
$1
=
$cmd
]
||
[
${
cmd
#
$1
}
!=
$cmd
]
;
then
shift
...
...
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