install.t (1164B)
- #!/usr/bin/env cram
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- $ export PATH="$TESTDIR/../cmd:$PATH"
- $ test "$(command -v install)" = "$TESTDIR/../cmd/install"
- install -D, multi src
- $ test ! -e gran
- $ touch sis bro
- $ install -D sis bro gran/dad
- $ test -f sis
- $ test -f bro
- $ test -d gran/dad
- $ test -f gran/dad/sis
- $ test -f gran/dad/bro
- $ rm -r sis bro gran
- install -T
- $ test ! -e src_T
- $ touch src_T
- $ test -e src_T
- $ install -T src_T dest_T
- $ test -e src_T
- $ test -e dest_T
- $ rm dest_T
- $ install -T src_T src2_T bogus_T
- install: error: Option -T passed, expected exactly 1 source operand, got 2
- [1]
- $ test -e src_T
- $ test ! -e src2_T
- $ test ! -e bogus_T
- $ rm src_T
- install -t
- $ touch src1_t src2_t
- $ test -e src1_t
- $ test -e src2_t
- $ mkdir dest_t
- $ test -d dest_t
- $ test ! -e dest_t/src1_t
- $ test ! -e dest_t/src2_t
- $ install -t dest_t src1_t src2_t
- $ test -e src1_t
- $ test -e src2_t
- $ test -e dest_t/src1_t
- $ test -e dest_t/src2_t
- $ rm -r dest_t src1_t src2_t
- No files should be left
- $ find .
- .