SymP (Symlink Populate) is a program written in fish that SymPly SymPlinks files with fewest SymPlinks as possible
Wiki: Purpose
- Resolution: Configure symlink resolution
- Absolute: Point to the absolute path
- Relative: Point to the relative path
- Overwrites: Change behavior for performing overwrites
- Force: Overwrite files without confirmation
- Interactive: Confirm overwrites interactively
- Backup: Create a backup before overwriting
- Blend: Symlinked files inherit access of their new parent directory
- Permission: DAC permissions
- Ownership: User & Group ownerships
- Occurrence: Filter files based on their appearance in the target
- Common: Present in the target
- Unique: Absent in the target (avoid overwrites)
The commands
ln --symbolic --force --no-target-directorycp --symbolic-link --force --no-target-directory --recursivesymp
will be used on the following file-hierarchy (since this program is an balance between the 2 standard utility commands):
- Source: 📁 original
- Target: 📁 link
File-hierarchy
📁 original # Source
├── 📁 common
│ ├── 📁 same
│ │ ├── 📄 1
│ │ └── 📄 2
│ └── 📁 unique
│ ├── 📄 same
│ └── 📄 unique-d
├── 📄 same
├── 📁 uniqued-o
│ └── 📄 sub
└── 📄 uniquef-o
📁 link # Target
├── 📁 common
│ ├── 📁 same
│ │ ├── 📄 1
│ │ └── 📄 2
│ └── 📁 unique
│ ├── 📄 same
│ └── 📄 unique-l
├── 📄 same
├── 📁 uniqued-l
│ └── 📄 sub
└── 📄 uniquef-l
ln -sfT- With 📁 link:
ln: Already exists - Without 📁 link:
🔗 link → 📁 original
- With 📁 link:
2. cp -sfTr
📁 common
├── 📁 same
│ ├── 🔗 1 → 📄 original/common/same/1
│ └── 🔗 2 → 📄 original/common/same/2
└── 📁 unique
├── 🔗 same → 📄 original/common/unique/same
├── 🔗 unique-d → 📄 original/common/unique/unique-d
└── 📄 unique-l
🔗 same → 📄 original/same
📁 uniqued-l
└── 📄 sub
📁 uniqued-o
└── 📄 sub → original/uniqued-o/sub
📄 uniquef-l
📄 uniquef-o → original/uniquef-o
3. symp
📁 common
├── 🔗 same → 📁 original/common/same
└── 📁 unique
├── 🔗 same → 📄 original/common/unique/same
├── 🔗 unique-d → 📄 original/common/unique/unique-d
└── 📄 unique-l
🔗 same → 📄 original/same
📁 uniqued-l
└── 📄 sub
🔗 uniqued-o → 📁 original/uniqued-o # Directory not present in Target
📄 uniquef-l
🔗 uniquef-o → 📄 original/uniquef-o # File not present in Target
# curl -fsSL 'https://raw.githubusercontent.com/Dracape/symp/main/install.fish' | fish -NP