Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
47b8a04c
Commit
47b8a04c
authored
Mar 07, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce is_dirpath and test for it
parent
e7909be7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
strings
share/eterbuild/functions/strings
+10
-0
test_is_dir.sh
tests/test_is_dir.sh
+23
-0
No files found.
share/eterbuild/functions/strings
View file @
47b8a04c
#!/bin/bash
# 2009-2010 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
filter_strip_spaces
()
{
...
...
@@ -38,3 +42,9 @@ initial_letter()
{
echo
$1
|
cut
-c1
}
is_dirpath
()
{
[
"
$1
"
=
"."
]
&&
return
$?
echo
"
$1
"
|
grep
-q
"/"
}
tests/test_is_dir.sh
0 → 100755
View file @
47b8a04c
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod strings
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
checkit
()
{
local
RES
is_dirpath
"
$1
"
RES
=
$?
check
"
$1
"
"
$2
"
"
$RES
"
}
checkit
.
0
checkit text 1
checkit text/ 0
checkit /text 0
checkit /text/test 0
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